Angular 4 Tutorial 6: Events And @HostListener


Post a Comment:





Showing 0 Comments:
Be the first to comment!

External ressources related to Angular 4 Tutorial 6: Events And @HostListener

Listening to Angular Key Events with Host Listeners - Angular ...
https://coryrylan.com/blog/listening-to-angular-key-events-with-host-listeners

The @HostListener has two parameters. The first is the name of the host event we would like to listen. For our use case, it will be the window:keyup event. The second parameter takes a list of arguments returned by the event you are listening.

What Are @HostBinding() and @HostListener() in Angular ...
https://dzone.com/articles/what-are-hostbinding-and-hostlistener-in-angular

In Angular, you do this using @HostListener(). To understand @HostListener() in a better way, consider another simple scenario: on the click of the host element, you want to show an alert window.

Angular - Is there list of HostListener-Events? - Stack Overflow
https://stackoverflow.com/questions/47771120/angular-is-there-list-of-hostlistener-events

I am using a hostlistener in a directive to detect "blur"- and "keyup"-events. Now I need to detect changes in the input-element the directive sits on.