Use case is we started a new $http request, and therefore needs to cancel 1 or more previous $http requests. Eg: var previousPromises = []; previousPromises.push($http().then(function(){})); ... Then: //previousPromises[0].cancel() or //previousPromises[0].reject() Reference https://groups.google.com/forum/?fromgroups#!searchin/angular/cancel$20http/angular/aT-MowZoPJg/kPEr5Ja0GEwJ
Use case is we started a new $http request, and therefore needs to cancel 1 or more previous $http requests.
Eg:
var previousPromises = [];
previousPromises.push($http().then(function(){}));
...
Then:
//previousPromises[0].cancel()
or
//previousPromises[0].reject()
Reference
https://groups.google.com/forum/?fromgroups#!searchin/angular/cancel$20http/angular/aT-MowZoPJg/kPEr5Ja0GEwJ