Q. Which Angular decorator is used to inject services in a constructor?

  • (A) @Injectable
  • (B) @Inject
  • (C) @Service
  • (D) @Provider
πŸ’¬ Discuss
βœ… Correct Answer: (B) @Inject
Explanation: @Inject is used to specify a custom provider token when injecting a service.
Explanation by: Mr. Dubey
@Inject is used to specify a custom provider token when injecting a service.

πŸ’¬ Discussion


πŸ“Š Question Analytics

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