I'm currently utilizing Angular Material 11.2, and I have a specific need to convert the inputted string into US dollars format.
My attempts so far include:
<input matInput formControlName="test" (onkeyup)="onKeyUpTest($event)" type="text">
onKeyUpTest(event){
var localNum = event.target.value.toLocaleString('en-US');
this.formGroup.patchValue({
'test': localNum
)}
}
Although this successfully binds the value, it does not include commas for thousand separators. Any assistance on this matter would be highly appreciated.
Thank you in advance.