- I'm facing an issue with subtracting two values and binding it to
ngModel
. I am receiving null values when sending data to a post request.
Despite using two bindings, the value is not updating. It keeps showing 'Pending_amount' as a null value.
<input type="number" matInput placeholder="Pending Amount [(ngModel)]='paymentmodel.pending_amount' [(value)]="paymentmodel.total_amount - paymentmodel.advance_amount" name="pendingamount">
For example: paymentmodel.total_amount = 10 paymentmodel.advance_amount = 5 paymentmodel.pending_amount = 5