How does dependency injection works in angular ?
Dependency injection (DI) is a design pattern where objects are passed to another object to complete tasks. In Angular, a service or component may require other dependent services to complete a task. Angular uses the dependency injection design pattern to fulfill these dependencies.

Angular supports this design pattern and you can use it in your applications to increase flexibility and modularity.