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:"&euro;"}}</span> 

example of rupee:

item price<span style="font-weight:bold;">{{price | currency:"&#8377;"}}</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,'&euro;') 

Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -