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

Function createApplyHandlers

test/angular/1.6/angular.js:12728–12748  ·  view source on GitHub ↗
(eventHandlers)

Source from the content-addressed store, hash-verified

12726 return promise;
12727
12728 function createApplyHandlers(eventHandlers) {
12729 if (eventHandlers) {
12730 var applyHandlers = {};
12731 forEach(eventHandlers, function(eventHandler, key) {
12732 applyHandlers[key] = function(event) {
12733 if (useApplyAsync) {
12734 $rootScope.$applyAsync(callEventHandler);
12735 } else if ($rootScope.$$phase) {
12736 callEventHandler();
12737 } else {
12738 $rootScope.$apply(callEventHandler);
12739 }
12740
12741 function callEventHandler() {
12742 eventHandler(event);
12743 }
12744 };
12745 });
12746 return applyHandlers;
12747 }
12748 }
12749
12750
12751 /**

Callers 1

sendReqFunction · 0.70

Calls 2

forEachFunction · 0.70
callEventHandlerFunction · 0.70

Tested by

no test coverage detected