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

Function postDigestTaskFactory

test/angular/1.6/angular-animate.js:2254–2270  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers 1

queueAnimationFunction · 0.70

Calls 1

fnFunction · 0.85

Tested by

no test coverage detected