I want to compare old and new values of ngmodel in ngModelchange function. I tried few solutions from stackoverflow but nothing is working in my case
This is my html code
<input type="text" [(ngModel)]="item.quantity" class="editInput" (ngModelChange)="rowchangcheck($event,item,i)" name="qty">
This is the function
rowchangcheck(event, item, index) {
console.log('oldvalue', item.quantity); //here value is getting changed
}
I have tried this but its not working stackoverflow answer
I want to get first value of ngModel before rowchange function and want to compare changed value with old one.How to do that please help