diff options
| author | Romain Neutron | 2012-12-06 01:35:37 +0100 |
|---|---|---|
| committer | Pawel Kozlowski | 2012-12-10 23:50:12 +0100 |
| commit | e48adebfb7f39f6b9f969d4686474d5d4fd097c4 (patch) | |
| tree | 994aa0f0ff9ac731a58263be464891873bf649dd | |
| parent | 0a61dcb486c4a97c1f9ff4f669faaa857fa626bd (diff) | |
| download | angular.js-e48adebfb7f39f6b9f969d4686474d5d4fd097c4.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.ngdoc | 6 |
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'); |
