cleanup(di): renamed viewInjector and hostInjector

BREAKING CHANGE
    Replace viewInjector with viewBindings
    Replace hostInjector with bindings
This commit is contained in:
vsavkin
2015-07-29 15:01:22 -07:00
parent 70bc485755
commit 3cda7128d0
34 changed files with 126 additions and 119 deletions

View File

@ -216,7 +216,7 @@ To better understand the kinds of injections which are supported in Angular we h
### Injecting Services
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.
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.
This example illustrates how to inject `MyService` into `House` directive.
@ -227,7 +227,7 @@ class MyService {} | Assume a service which needs to be inject
|
@Component({ | Assume a top level application component which
selector: 'my-app', | configures the services to be injected.
viewInjector: [MyService] |
viewBindings: [MyService] |
}) |
@View({ | Assume we have a template that needs to be
templateUrl: 'my_app.html', | configured with directives to be injected.
@ -361,7 +361,7 @@ class Dad {
@Component({
selector: '[grandpa]',
viewInjector: []
viewBindings: []
})
@View({
templateUrl: 'grandpa.html',