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

Function getService

lib/test/angular/1.6.7/angular.js:5027–5049  ·  view source on GitHub ↗
(serviceName, caller)

Source from the content-addressed store, hash-verified

5025 function createInternalInjector(cache, factory) {
5026
5027 function getService(serviceName, caller) {
5028 if (cache.hasOwnProperty(serviceName)) {
5029 if (cache[serviceName] === INSTANTIATING) {
5030 throw $injectorMinErr('cdep', 'Circular dependency found: {0}',
5031 serviceName + ' <- ' + path.join(' <- '));
5032 }
5033 return cache[serviceName];
5034 } else {
5035 try {
5036 path.unshift(serviceName);
5037 cache[serviceName] = INSTANTIATING;
5038 cache[serviceName] = factory(serviceName, caller);
5039 return cache[serviceName];
5040 } catch (err) {
5041 if (cache[serviceName] === INSTANTIATING) {
5042 delete cache[serviceName];
5043 }
5044 throw err;
5045 } finally {
5046 path.shift();
5047 }
5048 }
5049 }
5050
5051
5052 function injectionArgs(fn, locals, serviceName) {

Callers 1

injectionArgsFunction · 0.70

Calls 1

factoryFunction · 0.70

Tested by

no test coverage detected