MCPcopy
hub / github.com/angular-ui/ui-router / workFn

Function workFn

test/angular/1.2/angular-mocks.js:2041–2058  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2039 return isSpecRunning() ? workFn() : workFn;
2040 /////////////////////
2041 function workFn() {
2042 if (currentSpec.$injector) {
2043 throw new Error('Injector already created, can not register a module!');
2044 } else {
2045 var modules = currentSpec.$modules || (currentSpec.$modules = []);
2046 angular.forEach(moduleFns, function(module) {
2047 if (angular.isObject(module) && !angular.isArray(module)) {
2048 modules.push(function($provide) {
2049 angular.forEach(module, function(value, key) {
2050 $provide.value(key, value);
2051 });
2052 });
2053 } else {
2054 modules.push(module);
2055 }
2056 });
2057 }
2058 }
2059 };
2060
2061 /**

Callers 1

angular-mocks.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected