A

Admin • 828.70K Points
Coach

Q. How can you make a service available only to a specific module?

  • (A) Provide it in that module’s providers array
  • (B) Add @Injectable({providedIn: 'root'})
  • (C) Provide it in AppModule only
  • (D) Declare it in a component
  • Correct Answer - Option(A)
  • Views: 14
  • Filed under category Angular JS
  • Hashtags:

Explanation by: Admin
Providing a service in module limits its scope to that module.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.