title: AngularJS - Scope variable not updating in view
body: <p>I have an AngularJS controller (HomeCtrl) that loads data from HTTP, if it detects that there has been some data in LocalStorage.</p>
  
  <p>This check works on the entry of the controller.</p>
  
  <pre><code>var datOld = {
    APIDataService.getOldData($scope.searchTerms, totalPages, 1)
    .then(function(data) {
      console.log('Now getting data and applying it')
      $scope.records = data;
    }
  </code></pre>
  
  <p>I have <code>$records</code> in <code>ng-repeat</code> in view. It doesn't get updated.
  I have uploaded the entire project on Github for reference.
  <a href="https://github.com/kirobo/AngularApp" rel="nofollow noreferrer">https://github.com/kirobo/AngularApp</a></p>
  
  <p>I tried to do <code>$scope.apply()</code> too, but it doesn't update either.
  I would be glad if someone can point out what the error is or if something I am doing wrong.</p>