πŸ“Š Angular
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

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