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

Function getService

lib/test/angular/1.7.0/angular.js:5025–5047  ·  view source on GitHub ↗
(serviceName, caller)

Source from the content-addressed store, hash-verified

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

Callers 1

injectionArgsFunction · 0.70

Calls 1

factoryFunction · 0.70

Tested by

no test coverage detected