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

Function createApplyHandlers

test/angular/1.7/angular.js:13299–13319  ·  view source on GitHub ↗
(eventHandlers)

Source from the content-addressed store, hash-verified

13297 return promise;
13298
13299 function createApplyHandlers(eventHandlers) {
13300 if (eventHandlers) {
13301 var applyHandlers = {};
13302 forEach(eventHandlers, function(eventHandler, key) {
13303 applyHandlers[key] = function(event) {
13304 if (useApplyAsync) {
13305 $rootScope.$applyAsync(callEventHandler);
13306 } else if ($rootScope.$$phase) {
13307 callEventHandler();
13308 } else {
13309 $rootScope.$apply(callEventHandler);
13310 }
13311
13312 function callEventHandler() {
13313 eventHandler(event);
13314 }
13315 };
13316 });
13317 return applyHandlers;
13318 }
13319 }
13320
13321
13322 /**

Callers 1

sendReqFunction · 0.70

Calls 2

forEachFunction · 0.70
callEventHandlerFunction · 0.70

Tested by

no test coverage detected