MCPcopy Create free account
hub / github.com/angular-ui/ui-grid / injectionArgs

Function injectionArgs

lib/test/angular/1.6.7/angular.js:5052–5066  ·  view source on GitHub ↗
(fn, locals, serviceName)

Source from the content-addressed store, hash-verified

5050
5051
5052 function injectionArgs(fn, locals, serviceName) {
5053 var args = [],
5054 $inject = createInjector.$$annotate(fn, strictDi, serviceName);
5055
5056 for (var i = 0, length = $inject.length; i < length; i++) {
5057 var key = $inject[i];
5058 if (typeof key !== 'string') {
5059 throw $injectorMinErr('itkn',
5060 'Incorrect injection token! Expected service name as string, got {0}', key);
5061 }
5062 args.push(locals && locals.hasOwnProperty(key) ? locals[key] :
5063 getService(key, serviceName));
5064 }
5065 return args;
5066 }
5067
5068 function isClass(func) {
5069 // Support: IE 9-11 only

Callers 2

invokeFunction · 0.70
instantiateFunction · 0.70

Calls 1

getServiceFunction · 0.70

Tested by

no test coverage detected