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

Function getService

test/angular/1.5/angular.js:4705–4727  ·  view source on GitHub ↗
(serviceName, caller)

Source from the content-addressed store, hash-verified

4703 function createInternalInjector(cache, factory) {
4704
4705 function getService(serviceName, caller) {
4706 if (cache.hasOwnProperty(serviceName)) {
4707 if (cache[serviceName] === INSTANTIATING) {
4708 throw $injectorMinErr('cdep', 'Circular dependency found: {0}',
4709 serviceName + ' <- ' + path.join(' <- '));
4710 }
4711 return cache[serviceName];
4712 } else {
4713 try {
4714 path.unshift(serviceName);
4715 cache[serviceName] = INSTANTIATING;
4716 cache[serviceName] = factory(serviceName, caller);
4717 return cache[serviceName];
4718 } catch (err) {
4719 if (cache[serviceName] === INSTANTIATING) {
4720 delete cache[serviceName];
4721 }
4722 throw err;
4723 } finally {
4724 path.shift();
4725 }
4726 }
4727 }
4728
4729
4730 function injectionArgs(fn, locals, serviceName) {

Callers 1

injectionArgsFunction · 0.70

Calls 1

factoryFunction · 0.70

Tested by

no test coverage detected