Angular – Is there list of HostListener-Events?

Open angular dom element schema https://github.com/angular/angular/blob/master/packages/compiler/src/schema/dom_element_schema_registry.ts#L78

where:

  • (no prefix): property is a string.
  • *: property represents an event.
  • !: property is a boolean.
  • #: property is a number.
  • %: property is an object.

Then press ctrl+F and write *

enter image description here

@HostListener(and also (customEvent)="handler()") can also listen to custom events

Example

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)