Explain the use of @injectable()?



Explain the use of @injectable()?..

Answer / Ekta Dohrey

In AngularJS, @Injectable() is a decorator used to indicate that a class can be managed by Angular's dependency injection (DI) system. It marks a class as a service and makes it available for dependency injection. This allows you to easily manage the lifecycle of your services and make them testable.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More AngularJS Interview Questions

How does lazy load work?

1 Answers  


Is angular 2 mobile oriented?

1 Answers  


Why this project is called "AngularJS"?

1 Answers   SLK Software,


Is angular front or back end?

1 Answers  


List the key components of angular 2?

1 Answers  


What is the difference between an order and a directive?

1 Answers  


Explain ng-include directive in angularjs?

1 Answers  


When will nginit be called? How would you make use of ngoninit()?

1 Answers  


What are the interview questions for angularjs?

1 Answers  


Is typescript an oop?

1 Answers  


What is difference between factory and service?

1 Answers  


How to use {}, [], [] and [()] in angular2 template?

1 Answers  


Categories