how to use @HostListener in angular 8 code example Example: import hostlistener angular import { HostListener } from '@angular/core'