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

Function getService

lib/test/angular/1.5.0/angular.js:4539–4560  ·  view source on GitHub ↗
(serviceName, caller)

Source from the content-addressed store, hash-verified

4537 function createInternalInjector(cache, factory) {
4538
4539 function getService(serviceName, caller) {
4540 if (cache.hasOwnProperty(serviceName)) {
4541 if (cache[serviceName] === INSTANTIATING) {
4542 throw $injectorMinErr('cdep', 'Circular dependency found: {0}',
4543 serviceName + ' <- ' + path.join(' <- '));
4544 }
4545 return cache[serviceName];
4546 } else {
4547 try {
4548 path.unshift(serviceName);
4549 cache[serviceName] = INSTANTIATING;
4550 return cache[serviceName] = factory(serviceName, caller);
4551 } catch (err) {
4552 if (cache[serviceName] === INSTANTIATING) {
4553 delete cache[serviceName];
4554 }
4555 throw err;
4556 } finally {
4557 path.shift();
4558 }
4559 }
4560 }
4561
4562
4563 function injectionArgs(fn, locals, serviceName) {

Callers 1

injectionArgsFunction · 0.70

Calls 1

factoryFunction · 0.70

Tested by

no test coverage detected