10

I can't find simple and easy solution how to detect change in my textfield. I dont want to use (keypress) because the user will sometimes paste values into the field. (onchange) for example is working only when user will blur field. And I want to detect change immediately.

What is the easiest angular js $watch equivalent?

Teddy Sterne
  • 13,774
  • 2
  • 46
  • 51
gkucmierz
  • 1,055
  • 1
  • 9
  • 26

1 Answers1

25

use ngModelChange

input id="form_name" [(ngModel)]="quantity" (ngModelChange)="calculateTotal($event)" 
Sajeetharan
  • 216,225
  • 63
  • 350
  • 396