M

Mr. Dubey • 100.28K 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: 22
  • Filed under category Angular

Explanation by: Mr. Dubey
@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.


Question analytics