A

Admin • 833.24K Points
Coach

Q. What is the purpose of the @Injectable() decorator in Angular?

  • (A) To define a component
  • (B) To mark a class as available for dependency injection
  • (C) To create a directive
  • (D) To define a module
  • Correct Answer - Option(B)
  • Views: 35
  • Filed under category Angular JS
  • Hashtags:

Explanation by: Admin

@Injectable() marks a class as available to be injected as a dependency.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.