How to Format String As Indian Currency in AngularJS

April 13, 2016

AngularJS comes with many filters build-in which help us to develop apps without reinventing wheel.Today we’ll see about how to format string as Indian currency using currency filter.

We can do that in either HTML view itself or its controller.

Using Expression

{{ currency_expression | currency : symbol : fractionSize}}
{{ totalAmount | currency:'₹ ' }}

If you want to remove the decimal points then pass on another parameter.

{{ totalAmount | currency:'₹ ' :0 }}

Using Controller

$filter('currency')(amount, symbol, fractionSize)

👋 I'm Ashik Nesin • Sr. Frontend Engineer @Chargebee 👨‍💻• I write about modern Javascript & building web apps

© 2021 Nesin Technologies LLP