A

Admin • 833.24K Points
Coach

Q. What is the purpose of the 'providedIn' property in the @Injectable decorator?

  • (A) To specify the injector that provides the service
  • (B) To declare component metadata
  • (C) To import modules
  • (D) To define routes
  • Correct Answer - Option(A)
  • Views: 21
  • Filed under category Angular JS
  • Hashtags:

Explanation by: Admin

'providedIn' controls service scope, usually 'root' for singleton services.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.