I am using Angular 10 and imported the CurrencyPipe from '@angular/common' and based on the suggestions found, I implemented the following in the template -
<p>{{Amount | currency}}</p>
This shows the amount value in $ and with commas like expected but doesn't show the value in the textbox field but rather on top of the textbox. Please see the screenshot below -
How can I assign this value to the [Value] attribute so that it is displayed in the textbox?
It's a question large dicuss. I feel that the better bet is use a directive
Now we can use some like
where
see stackblitz
NOTE: This directive only work for template driven forms or Reactive Forms