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

Function getService

test/angular/1.7/angular.js:5075–5097  ·  view source on GitHub ↗
(serviceName, caller)

Source from the content-addressed store, hash-verified

5073 function createInternalInjector(cache, factory) {
5074
5075 function getService(serviceName, caller) {
5076 if (cache.hasOwnProperty(serviceName)) {
5077 if (cache[serviceName] === INSTANTIATING) {
5078 throw $injectorMinErr('cdep', 'Circular dependency found: {0}',
5079 serviceName + ' <- ' + path.join(' <- '));
5080 }
5081 return cache[serviceName];
5082 } else {
5083 try {
5084 path.unshift(serviceName);
5085 cache[serviceName] = INSTANTIATING;
5086 cache[serviceName] = factory(serviceName, caller);
5087 return cache[serviceName];
5088 } catch (err) {
5089 if (cache[serviceName] === INSTANTIATING) {
5090 delete cache[serviceName];
5091 }
5092 throw err;
5093 } finally {
5094 path.shift();
5095 }
5096 }
5097 }
5098
5099
5100 function injectionArgs(fn, locals, serviceName) {

Callers 1

injectionArgsFunction · 0.70

Calls 1

factoryFunction · 0.70

Tested by

no test coverage detected