I\'m calling 4 to 10 $http get calls in parallel. But after user search action I need display to same view but with different result. I populate set of data and new $http qu
You should use version 1.1.5, which has the ability to cancel $http requests:
https://github.com/angular/angular.js/blob/master/CHANGELOG.md
// set up a dummy canceler
var canceler = $q.defer();
// use it as a timeout canceler for the request
$http({method: 'GET', url: '/some', timeout: canceler.promise}).success(
function (data) { alert("this won't be displayed on cancel"); }
).error(
function (data) { alert("this will be displayed on cancel"); }
)
// now, cancel it (before it may come back with data)
$rootScope.$apply(function() {
canceler.resolve();
});
you can use the same canceler for all the requests, and resolve it just before starting the new set.