In this chapter, you will learn about Angular Dependency Injection. Dependency Injection is one of the most striking features in Angular; it allows us to create injectables that can be used as shared resources between various components.
In this chapter, we will discuss the following:
- Exploring Dependency Injection
- Learning about provider classes in detail
- Understanding hierarchical Dependency Injection
- Creating an Injectable
- Learning to inject providers into services
- Learning to inject providers inside the components
- Learning to resolve dependencies for a provider class
- Creating examples using the @Inject, provide, and useValue decorators