mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-05-24 13:53:43 +00:00
style($injector): add a comment to explain the distinction with isArray
This commit is contained in:
parent
ef7ba7b212
commit
d6984db4d5
1 changed files with 2 additions and 0 deletions
|
|
@ -584,6 +584,8 @@ function createInjector(modulesToLoad) {
|
||||||
var Constructor = function() {},
|
var Constructor = function() {},
|
||||||
instance, returnedValue;
|
instance, returnedValue;
|
||||||
|
|
||||||
|
// Check if Type is annotated and use just the given function at n-1 as parameter
|
||||||
|
// e.g. someModule.factory('greeter', ['$window', function(renamed$window) {}]);
|
||||||
Constructor.prototype = (isArray(Type) ? Type[Type.length - 1] : Type).prototype;
|
Constructor.prototype = (isArray(Type) ? Type[Type.length - 1] : Type).prototype;
|
||||||
instance = new Constructor();
|
instance = new Constructor();
|
||||||
returnedValue = invoke(Type, instance, locals);
|
returnedValue = invoke(Type, instance, locals);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue