MCPcopy Create free account
hub / github.com/binux/qiandao / getService

Function getService

web/static/components/angularjs/angular.js:3893–3914  ·  view source on GitHub ↗
(serviceName)

Source from the content-addressed store, hash-verified

3891 function createInternalInjector(cache, factory) {
3892
3893 function getService(serviceName) {
3894 if (cache.hasOwnProperty(serviceName)) {
3895 if (cache[serviceName] === INSTANTIATING) {
3896 throw $injectorMinErr('cdep', 'Circular dependency found: {0}',
3897 serviceName + ' <- ' + path.join(' <- '));
3898 }
3899 return cache[serviceName];
3900 } else {
3901 try {
3902 path.unshift(serviceName);
3903 cache[serviceName] = INSTANTIATING;
3904 return cache[serviceName] = factory(serviceName);
3905 } catch (err) {
3906 if (cache[serviceName] === INSTANTIATING) {
3907 delete cache[serviceName];
3908 }
3909 throw err;
3910 } finally {
3911 path.shift();
3912 }
3913 }
3914 }
3915
3916 function invoke(fn, self, locals){
3917 var args = [],

Callers 1

invokeFunction · 0.85

Calls 2

factoryFunction · 0.85
joinMethod · 0.80

Tested by

no test coverage detected