Event that when read the 'enter' key trigger a function


#1

There is someway to treat the ‘enter’ on an <ion-input> or to trigger the function?

Example:

<input #input id="input" type="text" (ngSubmit)="openDetailsPage()" [formControl]="barcode"/>

I know that is wrong, but I want something that when read the ‘enter’ key triggers the function.


#2

Angular provides a virtual (keyup.enter) event that you can listen to.


#3

It works like magic! Thx for your support. :smile: