You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.
It's possible to call window.clearTimeout() with the result of window.setTimeout() , but not so with $defer service.
Please either provide a way to clear $defer's within angular.js or return result of setTimeout, so it can be cleared outside.
self.defer = function(fn, delay) {
outstandingRequestCount++;
// ADDED return:
return setTimeout(function() { completeOutstandingRequest(fn); }, delay || 0);
};
angularServiceInject('$defer', function($browser, $exceptionHandler, $updateView) {
return function(fn, delay) {
// ADDED return:
return $browser.defer(function() {
try {
fn();
} catch(e) {
$exceptionHandler(e);
} finally {
$updateView();
}
}, delay);
};
}, ['$browser', '$exceptionHandler', '$updateView']);
The text was updated successfully, but these errors were encountered: