A

Admin • 833.24K Points
Coach

Q. What is a HostListener in Angular?

  • (A) Listens to events on child components
  • (B) Subscribes to observables
  • (C) Listens to DOM events on the host element
  • (D) Captures global events only
  • Correct Answer - Option(C)
  • Views: 21
  • Filed under category Angular JS
  • Hashtags:

Explanation by: Admin

@HostListener decorates methods to listen to DOM events on the host element.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.