RONE
RONE

Reputation: 5485

How to modify the currency filter, according to my currency symbol, Angularjs

<div ng-init="qty=1;cost=2">
    <b>Invoice:</b>
    <div>
        Quantity: <input type="number" ng-model="qty" required>
    </div>
    <div>
        Costs: <input type="number" ng-model="cost" required>
    </div>
    <div>
        <b>Total:</b> {{qty * cost | currency}} //may be change is required here
    </div>
</div>

This Results in :

enter image description here

like ₹, £, ¥

Upvotes: 0

Views: 63

Answers (1)

vdwijngaert
vdwijngaert

Reputation: 1555

You do this using the symbol parameter for the currency filter.

{{qty * cost | currency:"¥"}}

Check the reference: http://docs.angularjs.org/api/ng/filter/currency.

Upvotes: 1

Related Questions