I use this code to display amount and currency:
<td>{{transaction.amount | currency: transaction.currency :'code'}}</td>
This is the visual result:
USD10,080.00
Is there a way to get this result: 10,080.00 USD
I use this code to display amount and currency:
<td>{{transaction.amount | currency: transaction.currency :'code'}}</td>
This is the visual result:
USD10,080.00
Is there a way to get this result: 10,080.00 USD
If you are formatting the number and appending the ISO4217 currency code, then no need to output the symbol and code with the CurrencyPipe doc. Only use the pipe to format the number, and then append the currency code after the pipe output:
<td>{{ transaction.amount | currency:transaction.currency:'' }} {{ transaction.currency }}</td>
The second argument to the pipe removes the currency and symbol from the output. However, the number will still be formatted according to the currency.