I have an array, whose only value is current "1". It conferences a unique id in my MySQL database that I query through HTTP get to grab information on, I'm 100% sure my get request is not failing.
Here's the HTML code:
<dl>
<dt ng-repeat="x in favorites">{{getName(x)}}</dt>
<dd ng-repeat-end></dd>
</dl>
This is inside my controller and uses this code:
$scope.getName = function(x) {
console.log(x);
$http.get(GetURL + x)
.success(function(x) {
return x.name;
})
.error(function() {
console.log("Abort Abort!!!");
exit();
})
}
But whenever I run this, it pulls uncaught error "infinite digest loop". I can't see why this code is causing an infinite digest loop though, it definitely has something to do with my getName function, because once I removed it, the infinite digest loop stopped, but I can't seem to figure out why