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

Commit a66c968

Browse files
docs(guide): fix injector service code example
Fix syntax and update code to the latest API
1 parent c398d7d commit a66c968

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/content/guide/di.ngdoc

+3-3
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,11 @@ Here is an example of using the injector service.
6767
$window.alert(text);
6868
}
6969
};
70-
}).
71-
70+
});
71+
7272
// New injector is created from the module.
7373
// (This is usually done automatically by angular bootstrap)
74-
var injector = angular.injector('myModule');
74+
var injector = angular.injector(['myModule', 'ng']);
7575

7676
// Request any dependency from the injector
7777
var greeter = injector.get('greeter');

0 commit comments

Comments
 (0)