Explain the need for di in angularjs?



Explain the need for di in angularjs?..

Answer / Anurag Varshney

The need for Dependency Injection (DI) in AngularJS arises from the principle of separating concerns. By using DI, AngularJS allows you to create loosely coupled components that are easy to test and maintain. This is achieved by having AngularJS manage the creation and injection of objects into other objects as needed.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More AngularJS Interview Questions

What is json web token in angularjs?

1 Answers  


What are decorators in angular?

1 Answers  


What are the different types of directives?

1 Answers  


What is ng-content directive in angular?

1 Answers  


How to use angular datepicker in angular 5/4 applications?

1 Answers  


How can you decrease the digest cycle time?

1 Answers  


How long will it take to learn angularjs?

1 Answers  


How to get the data from db?

1 Answers  


Did you use scss?

1 Answers  


How to use the css binding in angular js?

1 Answers  


What is ngfor in angular?

1 Answers  


Can't bind to ngmodel since it isn't a known property of input?

1 Answers  


Categories