📜  angular $http 中止请求 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:05.059000             🧑  作者: Mango

代码示例1
var canceler = $q.defer();
$http.get('/someUrl', {timeout: canceler.promise}).success(successCallback);
// later...
canceler.resolve();  // Aborts the $http request if it isn't finished.