javascript - How to get specific currency symbol(rupee symbol in my case) in angular js instead of the default one (dollar $ symbol) -
when use 'currency' in angular js, getting dollar symbol. how required currency symbols based on requirements. if need know how display rupee symbol using currency. of great use if explain how make use of currency different symbols @ times of different requirements.
sample :
item price<span style="font-weight:bold;">{{item.price | currency}}</span>
if item.price 200. here shows 200$. need display rupee symbol instead of dollar.
to display currency symbol in angular js need provide html entity currency symbols below examples , usage in through code , in template :
inside template example of euro:
item price<span style="font-weight:bold;">{{price | currency:"€"}}</span>
example of rupee:
item price<span style="font-weight:bold;">{{price | currency:"₹"}}</span>
also check below url
http://www.cs.tut.fi/~jkorpela/html/euro.html
from controller :
inject $filter in controller
$scope.price=$filter('currency')($scope.price,'€')
Comments
Post a Comment