I want to apply decimal pipe on an input so the user can see comma separated numbers as he/she types. I have tried the ngx-mask but that only works if you type in the input. When you patch a value to the input it doesn't transform the value into decimal format.
Basically you can use ngModelChange when you value change you can use a pipe in your ngModel as below
<input [ngModel]="item.value | currency" (ngModelChange)="item.value=$event"
name="name" type="text" />
and more detail about it check this
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