Q. What is the purpose of the 'providedIn' property in the @Injectable decorator?

  • (A) To specify the injector that provides the service
  • (B) To declare component metadata
  • (C) To import modules
  • (D) To define routes
πŸ’¬ Discuss
βœ… Correct Answer: (A) To specify the injector that provides the service
Explanation: 'providedIn' controls service scope, usually 'root' for singleton services.
Explanation by: Mr. Dubey
'providedIn' controls service scope, usually 'root' for singleton services.

πŸ’¬ Discussion


πŸ“Š Question Analytics

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