docs(guide/di): use square bracket notation for $inject annotation

Closes #5104
This commit is contained in:
Evan Winslow 2013-11-23 15:18:54 -08:00 committed by Pete Bacon Darwin
parent 1497c6c1fb
commit cda061f723

View file

@ -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.