From 8c72549cc2477a6f898d9684a4c3db2ad2a7b149 Mon Sep 17 00:00:00 2001 From: phanboy4 Date: Mon, 12 Aug 2013 16:27:15 -0400 Subject: docs(guide): update description of $inject mechanism to be a little clearer --- docs/content/guide/di.ngdoc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/content/guide/di.ngdoc b/docs/content/guide/di.ngdoc index 241bd656..0b8cb263 100644 --- a/docs/content/guide/di.ngdoc +++ b/docs/content/guide/di.ngdoc @@ -147,6 +147,8 @@ of service names to inject. MyController.$inject = ['$scope', 'greeter']; +In this scenario the ordering of the values in the '$inject' array must match the ordering of the arguments to inject. +Using above code snippet as an example, '$scope' will be injected into 'renamed$scope' and 'greeter' into 'renamedGreeter'. Care must be taken that the `$inject` annotation is kept in sync with the actual arguments in the function declaration. -- cgit v1.2.3