Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit d6984db

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

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/auto/injector.js

+2
Original file line numberDiff line numberDiff line change
@@ -584,6 +584,8 @@ function createInjector(modulesToLoad) {
584584
var Constructor = function() {},
585585
instance, returnedValue;
586586

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

0 commit comments

Comments
 (0)