A

Admin • 825.56K Points
Coach

Q. What does the 'providedIn: root' metadata property in a service do?

  • (A) Makes the service singleton and available application-wide
  • (B) Limits service scope to the root component
  • (C) Prevents service injection
  • (D) Makes service available only in lazy loaded modules
  • Correct Answer - Option(A)
  • Views: 12
  • Filed under category Angular JS
  • Hashtags:

Explanation by: Admin
'providedIn: root' registers the service in the root injector as a singleton.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.