'How to hide currency symbol in angular currency pipe

I'm trying to use Angular currency pipe and I wanted to remove the currency symbol all together from the formatted number, but it seems there is no option to do that. So is there any easy way to achieve this without writing a custom pipe for it?



Solution 1:[1]

As @R.Richards mentioned, I ended up using the number pipe:

{{ 50000 | number }} <!-- output: 50,000 -->

Solution 2:[2]

Just send the arguments empty:

price | currency:'':''

Solution 3:[3]

Hope this example could help.

{{ 0001234.012 | currency:' ':'symbol':'0.0-1' }}  <!-- 1,234 -->
{{ 0001234.012 | currency:' ':'symbol':'0.1-1' }}  <!-- 1,234.0 -->
{{ 0001234.012 | currency:' ':'symbol':'0.0-2' }}  <!-- 1,234.01 -->
{{ 0001234.012 | currency:' ':'symbol':'0.2-2' }}  <!-- 1,234.01 -->

{{ 123 | currency:' ':'symbol':'5.0-0' }}          <!-- 00,123 -->
{{ 123 | currency:' ':'symbol':'4.0-0' }}          <!-- 0,123 -->
{{ 123 | currency:' ':'symbol':'3.0-0' }}          <!-- 123 -->

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1
Solution 2 JuanF
Solution 3