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 • Principal Software Engineer @Chargebee 👨‍💻• I write about web development & behinds the scenes of startup/side projects that I'm building

© 2022 Nesin Technologies LLP