A

Admin • 825.56K Points
Coach

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
  • Correct Answer - Option(A)
  • Views: 9
  • Filed under category Angular JS
  • Hashtags:

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

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.