Q. Which method is used to provide global dependencies in Angular?

  • (A) imports: []
  • (B) providers: [] in NgModule
  • (C) declarations: []
  • (D) bootstrap: []
πŸ’¬ Discuss
βœ… Correct Answer: (B) providers: [] in NgModule
Explanation: Services can be provided globally by including them in the `providers` array of a module.
Explanation by: Mr. Dubey
Services can be provided globally by including them in the `providers` array of a module.

πŸ’¬ Discussion


πŸ“Š Question Analytics

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