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

Function workFn

test/angular/1.7/angular-mocks.js:3143–3165  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3141 return wasInjectorCreated() ? workFn() : workFn;
3142 /////////////////////
3143 function workFn() {
3144 if (currentSpec.$injector) {
3145 throw new Error('Injector already created, can not register a module!');
3146 } else {
3147 var fn, modules = currentSpec.$modules || (currentSpec.$modules = []);
3148 angular.forEach(moduleFns, function(module) {
3149 if (angular.isObject(module) && !angular.isArray(module)) {
3150 fn = ['$provide', function($provide) {
3151 angular.forEach(module, function(value, key) {
3152 $provide.value(key, value);
3153 });
3154 }];
3155 } else {
3156 fn = module;
3157 }
3158 if (currentSpec.$providerInjector) {
3159 currentSpec.$providerInjector.invoke(fn);
3160 } else {
3161 modules.push(fn);
3162 }
3163 });
3164 }
3165 }
3166 };
3167
3168 module.$$beforeAllHook = (window.before || window.beforeAll);

Callers 1

angular-mocks.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected