According to the official document (here) You’ll be able to bind
1 |
keyup.enter |
to your
1 |
input |
control to just handle keyboard
1 |
Enter |
event like this:
1 |
(keyup.enter)="onEnter($event) |
What else can you do with this cool filter then?
According to the source code of Angular (Github) , you could use a lot more like:
- two events: keydown, keyup
- modifiers: e.g. keyup.control.shift.enter
- special key names: e.g. dot, space, escape, enter
- short forms: e.g. esc (short for escape)