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

Function getService

lib/test/angular/1.8.0/angular.js:5140–5162  ·  view source on GitHub ↗
(serviceName, caller)

Source from the content-addressed store, hash-verified

5138 function createInternalInjector(cache, factory) {
5139
5140 function getService(serviceName, caller) {
5141 if (cache.hasOwnProperty(serviceName)) {
5142 if (cache[serviceName] === INSTANTIATING) {
5143 throw $injectorMinErr('cdep', 'Circular dependency found: {0}',
5144 serviceName + ' <- ' + path.join(' <- '));
5145 }
5146 return cache[serviceName];
5147 } else {
5148 try {
5149 path.unshift(serviceName);
5150 cache[serviceName] = INSTANTIATING;
5151 cache[serviceName] = factory(serviceName, caller);
5152 return cache[serviceName];
5153 } catch (err) {
5154 if (cache[serviceName] === INSTANTIATING) {
5155 delete cache[serviceName];
5156 }
5157 throw err;
5158 } finally {
5159 path.shift();
5160 }
5161 }
5162 }
5163
5164
5165 function injectionArgs(fn, locals, serviceName) {

Callers 1

injectionArgsFunction · 0.70

Calls 1

factoryFunction · 0.70

Tested by

no test coverage detected