MCPcopy Create free account
hub / github.com/angular-ui/ui-router / completeOutstandingRequest

Function completeOutstandingRequest

test/angular/1.6/angular.js:6437–6452  ·  view source on GitHub ↗

* Executes the `fn` function(supports currying) and decrements the `outstandingRequestCallbacks` * counter. If the counter reaches 0, all the `outstandingRequestCallbacks` are executed.

(fn)

Source from the content-addressed store, hash-verified

6435 * counter. If the counter reaches 0, all the `outstandingRequestCallbacks` are executed.
6436 */
6437 function completeOutstandingRequest(fn) {
6438 try {
6439 fn.apply(null, sliceArgs(arguments, 1));
6440 } finally {
6441 outstandingRequestCount--;
6442 if (outstandingRequestCount === 0) {
6443 while (outstandingRequestCallbacks.length) {
6444 try {
6445 outstandingRequestCallbacks.pop()();
6446 } catch (e) {
6447 $log.error(e);
6448 }
6449 }
6450 }
6451 }
6452 }
6453
6454 function getHash(url) {
6455 var index = url.indexOf('#');

Callers 1

BrowserFunction · 0.70

Calls 1

sliceArgsFunction · 0.70

Tested by

no test coverage detected