I saw other questions about this but didn't helped me.
I have function in angularjs controller:
$scope.getUser = function(id){
ret = null;
$http.get('services/rest/users/' + id).then(
function(response){
ret = response.data.name;
},
function(response){
}
)
return ret;
}
And I call that function in html:
<div ng-repeat = "move in moves">Player:<span> {{getUser(move.player_id)}} </span> - {{move.guess}} - {{move.answer}}</div>
And this creates infinite loop of 'services/rest/users/' + id requests. I saw that angular can do this when some object in scope is always changing, but I don't see this here.
ng-repeat. I called that function from another place and it started looping again. Will try with$q.