Examples of DI in action in an Angular view hierarchy
$ yarn
$ yarn start
- Loosely covers concepts described in the Angular guide - Hierarchical Dependency Injection
- Uncomment
providers: []
andviewProviders: []
in theapp.module.ts
,app.component.ts
andchild.component.ts
to see the effect of different dependency providing strategies. - Copy inspectors from
README.inspectors.html
to their matching locations in the component templates to see what dependencies they are provided. - Uncomment
viewContainer.insert
lines inchild.component.ts
to seeViewContainerRef
view manipulation examples.