Reputation: 769
i'm learning AngularJS and in the tutorial i'm following we had to use the currency filter, i noticed that this changes, for example 10, into $10.00.
How do i do this for English pounds?
<p class="price">{{ product.price | currency }}</p>
Upvotes: 4
Views: 3075
Reputation: 382
You can add you symbol and fractionSize like this:
{{ currency_expression | currency : symbol : fractionSize}}
for now your solution is:
<p class="price">{{ price | currency : '£'}}</p>
More detail here
Upvotes: 0
Reputation: 4436
You Should really look at the Angularjs Documentation here
The format your looking for is
{{amount | currency:'£'}}
This tutorial discuss the currency filter in detail.
Upvotes: 1
Reputation:
angular currency filter take one optionnal parameter and it's the currency symbol.
With this information, your snippet will look like this :
<p class="price">{{product.price|currency:"£"}}</p>
Hope it's help
Upvotes: 5
Reputation: 740
{{ price | currency:'Symbol for pound'}}
Place your symbol for pound over here in ' '
Upvotes: 9