Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

docs(guide/di): Use square bracket notation for $inject annotation #5104

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/content/guide/di.ngdoc
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down