MCPcopy Create free account
hub / github.com/OpenReservation/OpenReservation / injectionArgs

Function injectionArgs

OpenReservation/wwwroot/Scripts/angular.js:4577–4591  ·  view source on GitHub ↗
(fn, locals, serviceName)

Source from the content-addressed store, hash-verified

4575 }
4576
4577 function injectionArgs(fn, locals, serviceName) {
4578 var args = [],
4579 $inject = createInjector.$$annotate(fn, strictDi, serviceName);
4580
4581 for (var i = 0, length = $inject.length; i < length; i++) {
4582 var key = $inject[i];
4583 if (typeof key !== 'string') {
4584 throw $injectorMinErr('itkn',
4585 'Incorrect injection token! Expected service name as string, got {0}',
4586 key);
4587 }
4588 args.push(locals && locals.hasOwnProperty(key) ? locals[key] : getService(key, serviceName));
4589 }
4590 return args;
4591 }
4592
4593 function isClass(func) {
4594 // IE 9-11 do not support classes and IE9 leaks with the code below.

Callers 2

invokeFunction · 0.85
instantiateFunction · 0.85

Calls 1

getServiceFunction · 0.85

Tested by

no test coverage detected