top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

What is use for Host Listener in Angular?

0 votes
389 views
What is use for Host Listener in Angular?
posted Jan 31, 2018 by Aarati Mahajan

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

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[]
})
answer Jan 31, 2018 by Manish Tiwari
...