I would like to know if it is possible in Angular 4 to have two ouput events calling 1 function?
<input type="button" value="send" (click, keydown.enter)="doMagic()"/>
instead of doing
<input type="button" value="send" (click)="doMagic()" (keydown.enter)="doMagic()"/>
@HostListener is not an option.
Thanks for your help!
It doesn't seem so - at least not from this issue asking for it as a feature: https://github.com/angular/angular/issues/6675
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With