A

Admin • 828.70K Points
Coach

Q. What does the Angular decorator @HostListener do?

  • (A) Binds a method to a DOM event of the host element
  • (B) Defines component inputs
  • (C) Creates a new Angular service
  • (D) Defines child components
  • Correct Answer - Option(A)
  • Views: 13
  • Filed under category Angular JS
  • Hashtags:

Explanation by: Admin
@HostListener listens to events on the component's host element and triggers methods.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.