Can someone please tell me what is the best practice for comparing ngModel old and new value?
In angular 1:
$scope.$watch(\'someProperty\', funciton(
This might work
(ngModelChange)="onModelChange(oldVal, $event); oldVal = $event;"
or
(ngModelChange)="onModelChange($event)"
oldValue:string; onModelChange(event) { if(this.oldValue != event) { ... } this.oldValue = event; }