1

I have multiple $http calls that I perform in a for loop in a controller in angularjs:

for(var i = 0; i < links.length;i++) {
 $http // calls a url with "i" as a parameter to retrieve data
}

My question is, if I do not want any of these calls to actually continue retrieving data (as it may take a lot of time to retrieve if links.length were say, greater than 100, then how can I make it such that I can click a button to "interrupt"/"stop" any of these $http calls from continuing?

Setsuna
  • 2,081
  • 7
  • 32
  • 50

0 Answers0