How to get specific currency symbol(rupee symbol in my case) in angular js instead of the default one (dollar $ symbol)

前端 未结 11 1472
野性不改
野性不改 2020-12-13 06:29

When i use \'currency\' in angular js, I am getting a dollar symbol. How to get required currency symbols based on the requirements. As if now i need to know how to display

11条回答
  •  悲&欢浪女
    2020-12-13 06:55

    Simple solution giving for the INR currency.

    If you want to display symbol

    Item Price{{item.price | currency:'INR'}}
    

    or

    Item Price{{item.price | currency:'INR':'symbol'}}
    

    or

    Item Price{{item.price | currency:'INR':'symbol-narrow'}}
    

    Result will look like: ₹140.00

    Or If you want to display code instead of symbol then use following

     Item Price{{item.price | currency:'INR':'code'}}
    

    Result will look like : INR140.00

    Similarly you can check for the code of the other countries and replace that instead of INR(India Code)

提交回复
热议问题