Welcome Guest! (App Version 5.16)
Dependency Injection is a way to inject dependencies in classes, components, services or any other unit of angular app so that the app can be fully modularize and there is clear separation of concerns.
For example various Rest API hits can be made in components only. Similary, data validation or validation of user inputs can be done in components only. But, we can make a seperate service to look to all these tasks, and keep components domain to only doing basic job to help render data on view.
We can simply say that Dependency Injection is a design-pattern where dependencies are given to a component instead of hard-coding them as code inside them. However, this concept is not restricted only to components.