javascript - angular currency filters in indian format - Stack Overflow

I am working on angular based application, its a financial application. In which, I need to display num

I am working on angular based application, its a financial application. In which, I need to display numbers in currency format in dynamic html. Below is the way I have used for this requirement :

$filter('currency')(amount)

it is working fine but it is showing number in US format but I need to display number in indian format.

Example : var amount = 100000

If I am going with above way then number is displayed as 100,000.

Desired Output: 1,00,000

Any help will be appreciated.

I am working on angular based application, its a financial application. In which, I need to display numbers in currency format in dynamic html. Below is the way I have used for this requirement :

$filter('currency')(amount)

it is working fine but it is showing number in US format but I need to display number in indian format.

Example : var amount = 100000

If I am going with above way then number is displayed as 100,000.

Desired Output: 1,00,000

Any help will be appreciated.

Share Improve this question asked Nov 21, 2016 at 7:45 techVtechV 9353 gold badges23 silver badges41 bronze badges 1
  • pls refer this link fiddle.jshell/creekworm/M83uK – Murali Commented Nov 21, 2016 at 7:52
Add a ment  | 

3 Answers 3

Reset to default 5

You can use Number.Prototype.toLocaleString() and as your indian you can use it directly,but if you have to specify format ,specify it as Number("100000").toLocaleString('en-IN')

check the following snippet

console.log(Number("100000").toLocaleString('en-IN'));

Hope it helps

Try this

Html

{{amount | currency:"₹":0}}

please refer https://docs.angularjs/api/ng/filter/currency

Add this format in html {{amount | currency:"₹":0}} you can also see it on url below. https://docs.angularjs/api/ng/filter/currency

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1742397100a4436172.html

相关推荐

  • javascript - angular currency filters in indian format - Stack Overflow

    I am working on angular based application, its a financial application. In which, I need to display num

    4小时前
    20

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信