How do I format the number as I type it in the html input box?
so for example, I want to type the number 2000, the moment I type the 4th digit, the text (that\'s cur
You can use ngx-format-field. It is a directive to format the input value which will appear in the view. It will not manipulate the Input value which will be saved in the backend. See link here!
Example:
component.html:
component.ts
onChangeCurrency() {
this.currency.patchValue(this.currency.value);
}
To see the demo: here!