mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-03-17 07:40:22 +00:00
style($injector): add a comment to explain the distinction with isArray
This commit is contained in:
parent
e351874a0a
commit
d3cd3c0a9b
1 changed files with 2 additions and 0 deletions
|
|
@ -585,6 +585,8 @@ function createInjector(modulesToLoad) {
|
|||
var Constructor = function() {},
|
||||
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;
|
||||
instance = new Constructor();
|
||||
returnedValue = invoke(Type, instance, locals);
|
||||
|
|
|
|||
Loading…
Reference in a new issue