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

Function createApplyHandlers

lib/test/angular/1.8.0/angular.js:13364–13384  ·  view source on GitHub ↗
(eventHandlers)

Source from the content-addressed store, hash-verified

13362 return promise;
13363
13364 function createApplyHandlers(eventHandlers) {
13365 if (eventHandlers) {
13366 var applyHandlers = {};
13367 forEach(eventHandlers, function(eventHandler, key) {
13368 applyHandlers[key] = function(event) {
13369 if (useApplyAsync) {
13370 $rootScope.$applyAsync(callEventHandler);
13371 } else if ($rootScope.$$phase) {
13372 callEventHandler();
13373 } else {
13374 $rootScope.$apply(callEventHandler);
13375 }
13376
13377 function callEventHandler() {
13378 eventHandler(event);
13379 }
13380 };
13381 });
13382 return applyHandlers;
13383 }
13384 }
13385
13386
13387 /**

Callers 1

sendReqFunction · 0.70

Calls 2

forEachFunction · 0.70
callEventHandlerFunction · 0.70

Tested by

no test coverage detected