diff options
| author | Robin Böhm | 2013-04-30 00:02:58 +0200 |
|---|---|---|
| committer | Pete Bacon Darwin | 2013-04-30 10:39:33 +0100 |
| commit | d6984db4d5da236cc48c832a1d6a00706c7267e9 (patch) | |
| tree | b3bbbca377e09025c540fbe8a73d3bddb4eeccec /src/auto/injector.js | |
| parent | ef7ba7b212b0ce49fed28ffb305948c323985b1f (diff) | |
| download | angular.js-d6984db4d5da236cc48c832a1d6a00706c7267e9.tar.bz2 | |
style($injector): add a comment to explain the distinction with isArray
Diffstat (limited to 'src/auto/injector.js')
| -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 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); |
