MCPcopy Create free account
hub / github.com/OpenReservation/OpenReservation / getService

Function getService

OpenReservation/wwwroot/Scripts/angular.js:4553–4575  ·  view source on GitHub ↗
(serviceName, caller)

Source from the content-addressed store, hash-verified

4551
4552 function createInternalInjector(cache, factory) {
4553 function getService(serviceName, caller) {
4554 if (cache.hasOwnProperty(serviceName)) {
4555 if (cache[serviceName] === INSTANTIATING) {
4556 throw $injectorMinErr('cdep',
4557 'Circular dependency found: {0}',
4558 serviceName + ' <- ' + path.join(' <- '));
4559 }
4560 return cache[serviceName];
4561 } else {
4562 try {
4563 path.unshift(serviceName);
4564 cache[serviceName] = INSTANTIATING;
4565 return cache[serviceName] = factory(serviceName, caller);
4566 } catch (err) {
4567 if (cache[serviceName] === INSTANTIATING) {
4568 delete cache[serviceName];
4569 }
4570 throw err;
4571 } finally {
4572 path.shift();
4573 }
4574 }
4575 }
4576
4577 function injectionArgs(fn, locals, serviceName) {
4578 var args = [],

Callers 1

injectionArgsFunction · 0.85

Calls 1

factoryFunction · 0.85

Tested by

no test coverage detected