$scope.$on('$destroy', function (event){ $timeout.cancel(promiseObj); });
如果我位于正在加载的页面上(因为页面包含$http请求,因此需要时间加载数据)并且在加载时,我从导航更改页面,$timeout 不会被删除,并且连续http调用正在进行。你能帮我吗?
$http
http
scope timeout ondestroy angularjs
angularjs ×1
ondestroy ×1
scope ×1
timeout ×1