• Overview
@angular/core

HostListener

decorator

Decorator that declares a DOM event to listen for, and provides a handler method to run when that event occurs.

  
    @HostListener ({})
  
  

eventName

string | undefined

The DOM event to listen for.

args

string[] | undefined

A set of arguments to pass to the handler method when the event occurs.

Jump to details