How can I use the ng-change event in angular 2? Whenever the ng-model variable is changed, a function has to be called.
[(ngModel)]=\"variable\" ngchange=variab
component have two-way binding
()
[]
that means you can use ==>[value]="variable"<== for showing data on html and ==>(input)="setVariable($event)"<== to update your var in ts/js.
[value]="variable"
(input)="setVariable($event)"
event.target.value
FYI==>https://angular.io/docs/ts/latest/guide/user-input.html