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

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.

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

6 Likes

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

great this save my day… im newbe thanks @HugoPetla and @rapropos