MCPcopy Create free account
hub / github.com/apache/cloudstack / getService

Function getService

tools/ngui/static/js/lib/angular.js:2849–2867  ·  view source on GitHub ↗
(serviceName)

Source from the content-addressed store, hash-verified

2847 function createInternalInjector(cache, factory) {
2848
2849 function getService(serviceName) {
2850 if (typeof serviceName !== 'string') {
2851 throw Error('Service name expected');
2852 }
2853 if (cache.hasOwnProperty(serviceName)) {
2854 if (cache[serviceName] === INSTANTIATING) {
2855 throw Error('Circular dependency: ' + path.join(' <- '));
2856 }
2857 return cache[serviceName];
2858 } else {
2859 try {
2860 path.unshift(serviceName);
2861 cache[serviceName] = INSTANTIATING;
2862 return cache[serviceName] = factory(serviceName);
2863 } finally {
2864 path.shift();
2865 }
2866 }
2867 }
2868
2869 function invoke(fn, self, locals){
2870 var args = [],

Callers 1

invokeFunction · 0.85

Calls 3

factoryFunction · 0.70
ErrorFunction · 0.50
joinMethod · 0.45

Tested by

no test coverage detected