I am trying to show the ones (pennies) position when my number is formatted through Angular's CurrencyPipe. Here is my CurrencyPipe:
(686.50 | currency:'USD': true: '1.0-2')
The current output is $686.5
.
The expected output is $686.50
.
My {minFractionDigits}
is 0 because I want to show whole numbers (e.g., 52.00) as $52
. However, when a decimal value other than .00 exists (either in the ones or tens position), I want my formatted number to include both decimal values, not just the tens (dimes) position.
How can I make the CurrencyPipe display the ones (pennies) position for numbers such as 686.50, while not display any decimals for numbers such as 52.00?