MCPcopy Create free account
hub / github.com/angular-ui/ui-grid / createApplyHandlers

Function createApplyHandlers

lib/test/angular/1.6.7/angular.js:12572–12592  ·  view source on GitHub ↗
(eventHandlers)

Source from the content-addressed store, hash-verified

12570 return promise;
12571
12572 function createApplyHandlers(eventHandlers) {
12573 if (eventHandlers) {
12574 var applyHandlers = {};
12575 forEach(eventHandlers, function(eventHandler, key) {
12576 applyHandlers[key] = function(event) {
12577 if (useApplyAsync) {
12578 $rootScope.$applyAsync(callEventHandler);
12579 } else if ($rootScope.$$phase) {
12580 callEventHandler();
12581 } else {
12582 $rootScope.$apply(callEventHandler);
12583 }
12584
12585 function callEventHandler() {
12586 eventHandler(event);
12587 }
12588 };
12589 });
12590 return applyHandlers;
12591 }
12592 }
12593
12594
12595 /**

Callers 1

sendReqFunction · 0.70

Calls 2

forEachFunction · 0.70
callEventHandlerFunction · 0.70

Tested by

no test coverage detected