MCPcopy Create free account
hub / github.com/JacksonTian/fks / getService

Function getService

fks_chart/bower_components/angular/angular.js:3918–3939  ·  view source on GitHub ↗
(serviceName)

Source from the content-addressed store, hash-verified

3916 function createInternalInjector(cache, factory) {
3917
3918 function getService(serviceName) {
3919 if (cache.hasOwnProperty(serviceName)) {
3920 if (cache[serviceName] === INSTANTIATING) {
3921 throw $injectorMinErr('cdep', 'Circular dependency found: {0}',
3922 serviceName + ' <- ' + path.join(' <- '));
3923 }
3924 return cache[serviceName];
3925 } else {
3926 try {
3927 path.unshift(serviceName);
3928 cache[serviceName] = INSTANTIATING;
3929 return cache[serviceName] = factory(serviceName);
3930 } catch (err) {
3931 if (cache[serviceName] === INSTANTIATING) {
3932 delete cache[serviceName];
3933 }
3934 throw err;
3935 } finally {
3936 path.shift();
3937 }
3938 }
3939 }
3940
3941 function invoke(fn, self, locals){
3942 var args = [],

Callers 1

invokeFunction · 0.85

Calls 1

factoryFunction · 0.85

Tested by

no test coverage detected