diff options
| author | Robin Böhm | 2013-04-30 00:02:58 +0200 |
|---|---|---|
| committer | Pete Bacon Darwin | 2013-04-30 10:40:19 +0100 |
| commit | d3cd3c0a9baa27a552cabe1938931743c13d307e (patch) | |
| tree | 7c89c0a75f8489d239e3ef6ec53a9955df7f2f36 | |
| parent | e351874a0aaf766127ee2bd0708ebe737536685e (diff) | |
| download | angular.js-d3cd3c0a9baa27a552cabe1938931743c13d307e.tar.bz2 | |
style($injector): add a comment to explain the distinction with isArray
| -rw-r--r-- | src/auto/injector.js | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/auto/injector.js b/src/auto/injector.js index ce68ef14..185995b4 100644 --- a/src/auto/injector.js +++ b/src/auto/injector.js @@ -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); |
