Jan 15, 2020 in Angular
Q: What is Dependency Injection in Angular?

1 Answer

0 votes
Jan 15, 2020

Dependency Injection (DI) is a software design pattern where the objects are passed as dependencies rather than hard-coding them within the component. The concept of Dependency Injection comes in handy when you are trying to separate the logic of object creation to that of its consumption. The ‘config’ operation makes use of DI that must be configured beforehand while the module gets loaded to retrieve the elements of the application. With this feature, a user can change dependencies as per his requirements.

Related questions

+2 votes
Jun 2, 2020 in JAVA
0 votes
Jan 27, 2020 in JAVA