A

Admin • 832.27K Points
Coach

Q. What is the correct way to inject a service into an Angular component?

  • (A) Using constructor injection
  • (B) Using @Input decorator
  • (C) Using @Output decorator
  • (D) Using template syntax
  • Correct Answer - Option(A)
  • Views: 30
  • Filed under category Angular JS
  • Hashtags:

Explanation by: Admin

Angular uses constructor parameters to inject services.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.