A

Admin • 833K Points
Coach

Q. Which Angular decorator is used to provide a service at the root level?

  • (A) @Injectable({ providedIn: 'root' })
  • (B) @Service()
  • (C) @RootService()
  • (D) @Provider()
  • Correct Answer - Option(A)
  • Views: 19
  • Filed under category Angular JS
  • Hashtags:

Explanation by: Admin

This syntax registers a service globally using tree-shakable providers.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.