aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/auto/injector.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/auto/injector.js b/src/auto/injector.js
index b309cff3..9654d395 100644
--- a/src/auto/injector.js
+++ b/src/auto/injector.js
@@ -584,6 +584,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);