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