Skip to content
This repository has been archived by the owner on Jan 14, 2023. It is now read-only.

Latest commit

 

History

History

Angular 2 Dependency Injection (DI) Explained

https://egghead.io/courses/angular-2-dependency-injection-di-explained

Angular 2 Dependency Injection (DI) Explained

27 minutes

This course will teach you the ins and outs of dependency injection in Angular 2. You will learn what dependency injection means, how it applies to software in general and how it is implemented in Angular 2. We will take a look at simple use cases like injecting services, to exploring different providers recipes and when they are useful. We will also cover almost unknown features like viewProviders, OpaqueToken and edge cases where forwardRef() is needed.

  1. What is Dependency Injection? 2:36
  2. Injecting a service into a component 3:07
  3. Understanding Providers 3:57
  4. Factory Providers 3:29
  5. Factory Providers with dependencies 3:05
  6. Understanding @Injectable 4:27
  7. Value Providers 3:00
  8. Understanding OpaqueToken 3:53