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

Commit c7b0d84

Browse files
phanboy4btford
phanboy4
authored andcommitted
docs(guide): update description of $inject mechanism to be a little clearer
1 parent e86de0d commit c7b0d84

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

docs/content/guide/di.ngdoc

+2
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,8 @@ of service names to inject.
147147
MyController.$inject = ['$scope', 'greeter'];
148148
</pre>
149149

150+
In this scenario the ordering of the values in the '$inject' array must match the ordering of the arguments to inject.
151+
Using above code snippet as an example, '$scope' will be injected into 'renamed$scope' and 'greeter' into 'renamedGreeter'.
150152
Care must be taken that the `$inject` annotation is kept in sync with the actual arguments in the
151153
function declaration.
152154

0 commit comments

Comments
 (0)