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

Function injectionArgs

lib/test/angular/1.7.0/angular.js:5050–5064  ·  view source on GitHub ↗
(fn, locals, serviceName)

Source from the content-addressed store, hash-verified

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

Callers 2

invokeFunction · 0.70
instantiateFunction · 0.70

Calls 1

getServiceFunction · 0.70

Tested by

no test coverage detected