::::::hmtl logic:::::
<img class="imageCss" ng-src="{{getImage(id)}}">
::::angular js method in the controller scope::::
$scope.getImage = function getImage(id){
console.log("in getImages");
console.log("id " + id);
var testData = $http.get('http:/images/getImage.do?imageId='+id).then(function(result) {
console.log(result);
return result;
});
//console.log("testData " + testData);
}
This method call from ng-src
triggers an infinite loop. I am suspecting the http request is doing this. I have no clue what is going wrong here.
Can someone please help me this?