Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the angular2 event for pressing 'Enter'

Tags:

angular

I have a refresh icon that is accessible (can be reached by tabbing), but the event trigger to refresh is (click), but this is not triggered when the focus is on the icon and enter is pressed. What is the event trigger for that called?

Code:

<span (click)="refresh()" tabindex="0" role="button"></span>
like image 611
matchi Avatar asked Jan 23 '18 12:01

matchi


1 Answers

(keyup.enter)="somefunction()"

this is the event for enter

like image 145
Obed Amoasi Avatar answered Oct 19 '22 19:10

Obed Amoasi