From a66c968df286f90ef39f04f7bef2d82557469268 Mon Sep 17 00:00:00 2001 From: Romain Neutron Date: Thu, 6 Dec 2012 01:35:37 +0100 Subject: [PATCH] docs(guide): fix injector service code example Fix syntax and update code to the latest API --- docs/content/guide/di.ngdoc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/content/guide/di.ngdoc b/docs/content/guide/di.ngdoc index ba54ff8d579..83c3e9b77f8 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');