You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: modules/angular2/docs/core/02_directives.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -216,7 +216,7 @@ To better understand the kinds of injections which are supported in Angular we h
216
216
217
217
### Injecting Services
218
218
219
-
Service injection is the most straight forward kind of injection which Angular supports. It involves a component configuring the `viewInjector` or `hostInjector` and then letting the directive ask for the configured service.
219
+
Service injection is the most straight forward kind of injection which Angular supports. It involves a component configuring the `bindings` or `viewBindings` and then letting the directive ask for the configured service.
220
220
221
221
This example illustrates how to inject `MyService` into `House` directive.
222
222
@@ -227,7 +227,7 @@ class MyService {} | Assume a service which needs to be inject
227
227
|
228
228
@Component({ | Assume a top level application component which
229
229
selector: 'my-app', | configures the services to be injected.
230
-
viewInjector: [MyService] |
230
+
viewBindings: [MyService] |
231
231
}) |
232
232
@View({ | Assume we have a template that needs to be
233
233
templateUrl: 'my_app.html', | configured with directives to be injected.
0 commit comments