Q. Which decorator is used to define a service in Angular?

  • (A) @Injectable
  • (B) @Service
  • (C) @Inject
  • (D) @Provider
πŸ’¬ Discuss
βœ… Correct Answer: (A) @Injectable
Explanation: Services are marked with the @Injectable decorator to indicate that they can be injected into components.
Explanation by: Mr. Dubey
Services are marked with the @Injectable decorator to indicate that they can be injected into components.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
59
Total Visits
πŸ“½οΈ
1 y ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
91%
Success Rate