πŸ“Š Angular
Q. What does the `providedIn: 'root'` option in `@Injectable()` indicate?
  • (A) The service is available application-wide
  • (B) The service is only available in root component
  • (C) The service is lazy loaded
  • (D) The service is restricted to one module
πŸ’¬ Discuss
βœ… Correct Answer: (A) The service is available application-wide

Explanation: `providedIn: 'root'` ensures a singleton service at app level.

Explanation by: Mr. Dubey
`providedIn: 'root'` ensures a singleton service at app level.

πŸ’¬ Discussion


πŸ“Š Question Analytics

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