Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

angular $http abort request

var canceler = $q.defer();
$http.get('/someUrl', {timeout: canceler.promise}).success(successCallback);
// later...
canceler.resolve();  // Aborts the $http request if it isn't finished.
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #angular #abort #request
ADD COMMENT
Topic
Name
2+7 =