In this Angular Free Video Tutorial, we will be covering What is DI? Benefits it provides?
Dependency Injection Overview
Dependency Injection often spelled as DI is linked into the Angular framework and can be utilized everywhere to serve new components with the services. Components absorb services, i.e, you can provide component access to the service class by injecting a service into a component.
ANGULAR = Angular Version 2/4/5/6/7
ANGULAR .JS = Angular 1
Let's understand an example
We want to build a computer. In reality, we need several object like processor, RAM, HDD etc. So, our computer and processor classes are shown here:
Computer class has a dependency on Processor class. That is the common programming that we follow to instantiate the a class.
In case, you might be interested to vide my other related Angular Free Video Tutorials, please click below links: