What is the use of @inject()?
Answer / Veerander Kumar Yadav
@Inject() is a decorator in Angular 2 that can be used instead of the constructor injection syntax to inject dependencies. It is useful when you need to override the default dependency resolution for a specific class, or when working with third-party libraries that do not support constructor injection.
| Is This Answer Correct ? | 0 Yes | 0 No |
Which framework is best for front end?
How to bypass angular xss protection?
What are the different types of directive?
What is the factory method in angular 2?
What is a service? How will you create a custom service?
Is typescript an oop?
What is routing in angular?
What is lazy loading in angular 2?
What are factory method in angularjs?
What is single page application?
What is difference between $interval and window. setInterval in AngularJS?
Is angular 2 mobile oriented?