Host Listener is used for event handling.
Declares a host listener.Angular will invoke the decorated method when the host element emits the specified event.
HostListener - will listen to the event emitted by host element, declared with @HostListener.
Syntax
@HostListener({
eventName?: string
args?: string[]
})