Instructor: The goal of this Angular service injection with the dependency injector course is to learn about the various ways Angular services can be created and provided with the dependency injector. If you think about dependency injection as being a very core part of Angular/Jest version one already, and it's actually still a fundamental element in Angular today.
While dependency injection in general has a broader range of applications within Angular, in this course, we will mostly focus on the Angular service part, and how they make use of the dependency injection.
First of all, we will walk through very simple standalone examples. We'll be learning about what a service is about, how we can define one, and why we need dependency injection in the first place. We will about concepts such as service aliases and value providers, highlighting some use cases for those as well.
We obviously also create an Angular factory provider. We will learn how to pass dependencies into such a factory function and get to know why such factory functions can actually be a lifesaver in certain situations.
In general, services by themselves are singletons, meaning we only have one instance per application. There are mechanisms, however, how we can control lifetime of a service, as well as the number of instance we want to have.
That's also why we will get first into conduct with the hierarchical nature of Angular's dependency injector. Towards the end of the course, we will take a look at more advanced topics. For instance, we will see how these loaded modules together with shared services can cause you quite some headache, which is also known an Angular provider shadowing.
We will learn about how to circumvent and overcome such side effects, and how to implement best practices. Finally, we will also take a look at how to apply some more fine-grain control over the dependency injector.
I'm actually very excited about this course because it teaches you from the very basics to the more advanced topics of Angular services and dependency injection, something you definitely need on a daily basis within your Angular apps.