I want to only call updateDetail() on the blur event and only if the model has changed. So right now if the user blurs (tabs) out of the input box without making a change it will call updateDetail() and perform unnecessary calculations. Can someone please remove my ignorance?
<input type="text" (ngModelChange)="updateDetail(d)" [ngModelOptions]="{updateOn: 'blur'}" name='detail-monthly-payment'
[(ngModel)]="d.periodPayment" />
Use just (change)
in place of (ngModelChange)
I think, This issue is no more with Angular5, Please check
WORKING DEMO
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With