Skip to content

Commit d3cd3c0

Browse files
robinboehmpetebacondarwin
authored andcommitted
style($injector): add a comment to explain the distinction with isArray
1 parent e351874 commit d3cd3c0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/auto/injector.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -585,6 +585,8 @@ function createInjector(modulesToLoad) {
585585
var Constructor = function() {},
586586
instance, returnedValue;
587587

588+
// Check if Type is annotated and use just the given function at n-1 as parameter
589+
// e.g. someModule.factory('greeter', ['$window', function(renamed$window) {}]);
588590
Constructor.prototype = (isArray(Type) ? Type[Type.length - 1] : Type).prototype;
589591
instance = new Constructor();
590592
returnedValue = invoke(Type, instance, locals);

0 commit comments

Comments
 (0)