title: AngularJS: Scope variable not updating in view
body: <p>It seems that my view variable is not updating on the onSubmit event.
  I can see in console that the performed call to an API gets the correct results, but I do not display them properly.</p>
  
  <p><strong>JS</strong></p>
  
  <pre><code>     angular.module('FooApp')
       .controller('FooListController', ['$scope', 'FooMapper', 'moment', 'APP_URL', '$location', function($scope, FooMapper, moment, APP_URL, $location) {
  
  
           $scope.submit = function (){
  
               var promise = FooMapper.find($scope.fooName);
  
               console.log('-- Search string: '+ $scope.fooName);
               $scope.isLoading = 0;
               promise.then(function(foo){
  
                   console.log('New Promise foo: ', foo);
                   $scope.fooResults = foo;
  
               })
           } // end of anonymous function
  
  }
  ]);
  </code></pre>
  
  <p><strong>HTML</strong></p>
  
  <pre><code>&lt;div ng-include="APP_URL + '/view/fooResolver/searchForm.html'" ng-controller="FooListController"&gt;   &lt;/div&gt;
      &lt;div ng-if="!isLoading" class="row"&gt;
  
          &lt;div ng-if="!fooResults" class="col-md-12"&gt;
              &lt;div class="alert alert-warning"&gt;
                  No foos found.
              &lt;/div&gt;
          &lt;/div&gt;
  
          &lt;div ng-if="fooResults" class="col-md-12"&gt;
  
                          &lt;tr ng-repeat="foo in fooResults" class="active"&gt;
  
                              &lt;td&gt;
                                  {{foo.id}}
                              &lt;/td&gt;
                              &lt;td&gt;
                                  &lt;b&gt;{{foo.name}}&lt;/b&gt;
                              &lt;/td&gt;
                              &lt;td&gt;
                                  {{foo.country}}
                              &lt;/td&gt;
      ....
  </code></pre>
  
  <p>I have also tried with $scope.$apply() but still getting the same result.
  Is there any chance that I have more than one scopes around?</p>
  
  <p>Thank you.</p>