MCPcopy Index your code
hub / github.com/angular-ui/ui-router / postDigestTaskFactory

Function postDigestTaskFactory

test/angular/1.5/angular-animate.js:2246–2262  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2244 var animationsEnabled = null;
2245
2246 function postDigestTaskFactory() {
2247 var postDigestCalled = false;
2248 return function(fn) {
2249 // we only issue a call to postDigest before
2250 // it has first passed. This prevents any callbacks
2251 // from not firing once the animation has completed
2252 // since it will be out of the digest cycle.
2253 if (postDigestCalled) {
2254 fn();
2255 } else {
2256 $rootScope.$$postDigest(function() {
2257 postDigestCalled = true;
2258 fn();
2259 });
2260 }
2261 };
2262 }
2263
2264 // Wait until all directive and route-related templates are downloaded and
2265 // compiled. The $templateRequest.totalPendingRequests variable keeps track of

Callers 1

queueAnimationFunction · 0.70

Calls 1

fnFunction · 0.85

Tested by

no test coverage detected