Using AngularJs 1.6.5 I am making multiple $http GET calls using the for loop. Here is the code:-
for(var i=0; i < 11; i++){
var url = "/api/learner_qa/" + i;
$http.get(url).then(successCallback, errorCallback);
function successCallback(response){
console.log(response);
};
function errorCallback(error){
console.log(error);
};
};
What I want to do is trigger a function when all the GET requests are completed.
I referred to answer posted here and want to know how can this be done on an array as in my case?