πŸ“Š Angular
Q. What is the purpose of 'providedIn: root' in a service?
  • (A) To limit the service to a module
  • (B) To make the service available application-wide
  • (C) To disable service injection
  • (D) To provide service only in root component
πŸ’¬ Discuss
βœ… Correct Answer: (B) To make the service available application-wide

Explanation: ‘providedIn: root’ registers the service in the root injector.

Explanation by: Mr. Dubey
‘providedIn: root’ registers the service in the root injector.

πŸ’¬ Discussion


πŸ“Š Question Analytics

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