What are the difference between @injectable() vs. @Inject() in angular 2?
Answer / Himanshu Verma
The @Injectable() decorator is used to mark a class as an injectable service, allowing it to be provided by Angular's dependency injection system. The @Inject() decorator is used within the constructor of a class to specify the dependencies that need to be injected.
| Is This Answer Correct ? | 0 Yes | 0 No |
Is angularjs a framework?
How can you decrease the digest cycle time?
What is angular good for?
What is angular subscribe?
What do you mean by data binding?
What is ng-switch in angularjs?
What is SPA (Single Page Application) in AngularJS?
Who created angular?
What is the use of interceptors in angular?
What is @input and @output in angular?
What do you understand by constants in angular?
Explain the concept of scope. How does scope inheritance work in angularjs?