title: Angular Links in view not working
body: <p>I am just beginning to experiment with AngularJS and have come across a problem.</p>
  
  <p>My main page renders a <code>&lt;ng-view&gt;</code> element and I have set up the following routes:</p>
  
  <pre><code>(function () {
     var routes = function ($routeProvider) {
        $routeProvider.
           when('/', {
              templateUrl: 'Home/Overview',
              controller: 'OverviewPageController'
           })
           .when('/Issue/:id', {
              templateUrl: 'Home/Issue'
           })
           .otherwise({ redirectTo: '/' });
     }
  
     routes.$inject = ['$routeProvider'];
  
     angular.module('PublicationSchedulerApp')
        .config(routes);
  
  }());
  </code></pre>
  
  <p>If I add a link tag outside of the <code>&lt;ng-view&gt;</code>:</p>
  
  <pre><code>&lt;a ng-href="#/Issue/123"&gt;Issue&lt;/a&gt;
  </code></pre>
  
  <p>The 'Issue' page is loaded into the view as expected.</p>
  
  <p>In my case however, the Overview controller loads some data via an asynchronous Ajax call and then renders a table with a custom directive which, in turn, uses <code>&lt;ng-repeat&gt;</code>.  If I create the same link within this directive/table:</p>
  
  <pre><code>&lt;tr ng-repeat="issue in issues"&gt;
     &lt;td&gt;
        &lt;a ng-href="#/issue/{{ issue.issueId }}"&gt;{{ issue.subject }}&lt;/a&gt;
     &lt;/td&gt;
  &lt;/tr&gt;
  </code></pre>
  
  <p>The routing doesn't work.  As you can see, I have played around with changing the link attribute from <code>href</code> to <code>ng-href</code> but this doesn't seem to make any difference.  I am guessing that the asynchronous loading of the data is somehow breaking the routing, but I am not sure how to fix it.  A couple of posts suggested that I reload the $route after the data load:</p>
  
  <pre><code>angular.module('PublicationSchedulerApp')
  .run(['$route', function ($route) {
     $route.reload();
  }]);
  </code></pre>
  
  <p>but this didn't appear to make any difference either.</p>
  
  <p>Any help would be much appreciated - thanks.</p>