title: AngularJS infinite loop of calls when calling a function?
body: <p>The title says it all. I'm calling a function in the controller and, somehow, the client keeps sending the request over and over again. Here is the function:</p>
  
  <pre><code>vm.user = null;
      vm.getUser=getUser;
  
      function getUser(id){
          $http({method:'GET', url: 'http://localhost:8080/api/user/'+id}).
              then(function(response){
                  $scope.status = response.status;
                  vm.user = response.data;
                  return vm.user.login;
          }, function(response){
              $scope.status = response.status;
              vm.user = response.data || 'Request failed';
          });
      }
  </code></pre>
  
  <p>And here is the call in the html file</p>
  
  <pre><code>&lt;span class="reviewUnitText"&gt;{{vm.getUser(vm.review.userId)}}&lt;/span&gt;
  </code></pre>
  
  <p>(the function is called only once, when loading the page. No ng-repeat)
  Why is it executed over and over again?</p>