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

Commit a4f73c9

Browse files
adamseaNarretz
authored andcommitted
docs(guide/Dependency Injection): fix angular.injector arguments list
The original file included a code sample using `angular.injector(['myModule', 'ng'])`, which appears to be incorrect when trying to retrieve anything attached to `myModule`. Reversing the args fixes this. Closes #12292
1 parent bd5c4e5 commit a4f73c9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/content/guide/di.ngdoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ Create a new injector that can provide components defined in our `myModule` modu
293293
`greeter` service from the injector. (This is usually done automatically by angular bootstrap).
294294

295295
```js
296-
var injector = angular.injector(['myModule', 'ng']);
296+
var injector = angular.injector(['ng', 'myModule']);
297297
var greeter = injector.get('greeter');
298298
```
299299

0 commit comments

Comments
 (0)