<input [value]="control.value" currencyMask [id]="control.fieldId" [type]="text" (keypress)="onkeypress($event)">
The above field is supposed to be currency field. I am using currencyMask to format the field value as the user enters. But when the value is passed to the input from backend(to be shown as a pre-filled data), it doesnt get formatted.
So i am thinking to implement a pipe which formats the value in both cases. But i have no proper way to implement that.
I tried as:
input [value]="{{control.value | customPipe}}" currencyMask [id]="control.fieldId" [type]="text" (keypress)="onkeypress($event)"
it was throwing an error as unexpected {{}}
I am open to any better suggestions