πŸ“Š Angular
Q. How do you define a service that should be scoped only to a specific Angular module?
  • (A) Provide it in the module's providers array
  • (B) Use providedIn: 'root'
  • (C) Use providedIn: 'any'
  • (D) Add it to the component's providers array
πŸ’¬ Discuss
βœ… Correct Answer: (A) Provide it in the module's providers array

Explanation: Services provided in a module’s providers are scoped to that module.

Explanation by: Mr. Dubey
Services provided in a module’s providers are scoped to that module.

πŸ’¬ Discussion


πŸ“Š Question Analytics

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