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

Function injectionArgs

lib/test/angular/1.5.0/angular.js:4563–4577  ·  view source on GitHub ↗
(fn, locals, serviceName)

Source from the content-addressed store, hash-verified

4561
4562
4563 function injectionArgs(fn, locals, serviceName) {
4564 var args = [],
4565 $inject = createInjector.$$annotate(fn, strictDi, serviceName);
4566
4567 for (var i = 0, length = $inject.length; i < length; i++) {
4568 var key = $inject[i];
4569 if (typeof key !== 'string') {
4570 throw $injectorMinErr('itkn',
4571 'Incorrect injection token! Expected service name as string, got {0}', key);
4572 }
4573 args.push(locals && locals.hasOwnProperty(key) ? locals[key] :
4574 getService(key, serviceName));
4575 }
4576 return args;
4577 }
4578
4579 function isClass(func) {
4580 // IE 9-11 do not support classes and IE9 leaks with the code below.

Callers 2

invokeFunction · 0.70
instantiateFunction · 0.70

Calls 1

getServiceFunction · 0.70

Tested by

no test coverage detected