Display amount as currency with fractions only when currency type has fractions

后端 未结 4 1331
庸人自扰
庸人自扰 2020-12-22 12:59

I use this code to display amount:

 {{transaction.amount}} {{transaction.currency}}

Currently I have this output: 5603

4条回答
  •  执笔经年
    2020-12-22 13:33

    This doesn't necessarily answer your question, but have you considered using the built in currency Pipe?

    https://angular.io/api/common/CurrencyPipe

提交回复
热议问题