How to listen input change on every keypress in Angular 2+ ?
Well it is very simple, we just have to call method on (input):
<input matInput type="text" (input)="onChange($event)">
and then in your component create that function and listen for event.target.value
:
onChange(event): void{
console.log(event.target.value)
}
🍻