我只想在更改输入值后选择值,我需要在输入值后求和。
<input currencyMask [(ngModel)]="baixa.juros" (ngModelChange)="setJuros($event.target.value)" [options]="{ prefix: '', thousands: '.', decimal: ',', allowNegative: false }" name="valor_juros" id="valor_juros_liq" class="input-default" />
它不起作用,因为它会在每次按键时调用该函数
最佳答案
使用 (focusout)
来仅在完成输入值时调用该函数。
每次更改值时都会触发 (change)
方法,每次按键也是如此。
关于angular - 仅在更改 ngx-currency 后选择值,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56602977/