mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-03-16 23:30:23 +00:00
docs(guide/di): use square bracket notation for $inject annotation
Closes #5104
This commit is contained in:
parent
1497c6c1fb
commit
cda061f723
1 changed files with 1 additions and 1 deletions
|
|
@ -146,7 +146,7 @@ of service names to inject.
|
|||
var MyController = function(renamed$scope, renamedGreeter) {
|
||||
...
|
||||
}
|
||||
MyController.$inject = ['$scope', 'greeter'];
|
||||
MyController['$inject'] = ['$scope', 'greeter'];
|
||||
</pre>
|
||||
|
||||
In this scenario the ordering of the values in the '$inject' array must match the ordering of the arguments to inject.
|
||||
|
|
|
|||
Loading…
Reference in a new issue