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

Function getService

lib/test/angular/1.4.3/angular.js:4398–4419  ·  view source on GitHub ↗
(serviceName, caller)

Source from the content-addressed store, hash-verified

4396 function createInternalInjector(cache, factory) {
4397
4398 function getService(serviceName, caller) {
4399 if (cache.hasOwnProperty(serviceName)) {
4400 if (cache[serviceName] === INSTANTIATING) {
4401 throw $injectorMinErr('cdep', 'Circular dependency found: {0}',
4402 serviceName + ' <- ' + path.join(' <- '));
4403 }
4404 return cache[serviceName];
4405 } else {
4406 try {
4407 path.unshift(serviceName);
4408 cache[serviceName] = INSTANTIATING;
4409 return cache[serviceName] = factory(serviceName, caller);
4410 } catch (err) {
4411 if (cache[serviceName] === INSTANTIATING) {
4412 delete cache[serviceName];
4413 }
4414 throw err;
4415 } finally {
4416 path.shift();
4417 }
4418 }
4419 }
4420
4421 function invoke(fn, self, locals, serviceName) {
4422 if (typeof locals === 'string') {

Callers 1

invokeFunction · 0.70

Calls 1

factoryFunction · 0.70

Tested by

no test coverage detected