Listening to Enter Events in Angular Material Reactive Input Fields | Task

Ole Ersoy
Mar - 14  -  1 min

Scenario

We want to listen to keyboard enter events on an Angular Material reactive input field, calling addTodo() when the enter event occurs. The field is bound to a reactive form control. When the enter event occurs, we reset / clear the FormControl value.

Demo