Understanding Dependency Injection

In this lesson, we'll take the time to learn about dependency injection in Angular.

Dependency injection is one of those things that can be difficult to wrap your head around. It’s a feature in Angular that makes our lives so much easier. Let’s look at why dependency injection is great and how it works in Angular.

Drawbacks without dependency injection

We’ll step away from our project for a moment. First, we’re going to look at some of the problems we’ll encounter without dependency injection.

Let’s look at an example.

Get hands-on with 1400+ tech skills courses.