Which decorator is optional if the class has any other decorator?
Answers
Answered by
1
To define a class as a service in Angular, use the @Injectable() decorator to provide the metadata that allows Angular to inject it into a component as a dependency. Similarly, use the @Injectable() decorator to indicate that a component or other class (such as another service, a pipe, or an NgModule) has a dependency.
Answered by
0
Answer:
Explanation:
To define a class as a service in Angular, use the @Injectable() decorator to provide the metadata that allows Angular to inject it into a component as a dependency. Similarly, use the @Injectable() decorator to indicate that a component or other class (such as another service, a pipe, or an NgModule) has a dependency.
Similar questions
Computer Science,
1 month ago
Science,
1 month ago
Social Sciences,
1 month ago
Math,
3 months ago
English,
3 months ago
Physics,
9 months ago
Biology,
9 months ago
Science,
9 months ago