MCPcopy
hub / github.com/angular-ui/ui-router / postDigestTaskFactory

Function postDigestTaskFactory

test/angular/1.4/angular-animate.js:2253–2269  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers 1

queueAnimationFunction · 0.70

Calls 1

fnFunction · 0.85

Tested by

no test coverage detected