aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRomain Neutron2012-12-06 01:35:37 +0100
committerPawel Kozlowski2012-12-10 23:19:20 +0100
commita66c968df286f90ef39f04f7bef2d82557469268 (patch)
tree4ce0a379103f008979d6d548ba006789a53177fd
parentc398d7d3709333c4a228d955b5ee8cbcf4386468 (diff)
downloadangular.js-a66c968df286f90ef39f04f7bef2d82557469268.tar.bz2
docs(guide): fix injector service code example
Fix syntax and update code to the latest API
-rw-r--r--docs/content/guide/di.ngdoc6
1 files changed, 3 insertions, 3 deletions
diff --git a/docs/content/guide/di.ngdoc b/docs/content/guide/di.ngdoc
index ba54ff8d..83c3e9b7 100644
--- a/docs/content/guide/di.ngdoc
+++ b/docs/content/guide/di.ngdoc
@@ -67,11 +67,11 @@ Here is an example of using the injector service.
$window.alert(text);
}
};
- }).
-
+ });
+
// New injector is created from the module.
// (This is usually done automatically by angular bootstrap)
- var injector = angular.injector('myModule');
+ var injector = angular.injector(['myModule', 'ng']);
// Request any dependency from the injector
var greeter = injector.get('greeter');