Reputation: 593
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>
Upvotes: 11
Views: 9103
Reputation: 1208
(keydown)="someFun()"
Ex:
<input type="text" class="form-control" [(ngModel)]="userName" (keydown)="userNameEntered()">
Upvotes: 0