isoCurrency

AngularJS filter that retrieves currency symbols according to ISO 4217 currency codes.

Angular Core Dependency: ^1.4.6

Module License: MIT

Added by: Sam Deering

GitHub

Repository

zwacky/isocurrency

Stats

Stars: 19

Watchers: 19

Forks: 14

Author

Simon
Simon

Module Description

isoCurrency

AngularJS filter that retrieves currency symbols according to ISO 4217 currency codes.

Installation

  • bower install iso-currency
  • add 'isoCurrency' to your angular.module dependency, usually in app.js

Demo

http://jsfiddle.net/nqf0ye00/1/

Usage

Instead of directly using the currency symbol, you only need the 3 char long currency code (e.g. USD or JPY). It will take the right symbol, format and fraction size. The latter can be overridden by providing an explicity fraction size value after the currency field (see below).

// in controller
$scope.amount = 50.50;
$scope.currency = 'USD';

// in template
{{ amount | isoCurrency:currency }} // $50.50
{{ amount | isoCurrency:currency:0 }} // $50

Module stats last updated: 2017-10-13 16:00:05

Disclaimer: Some data on this page may have been gathered from the authors GitHub respository. If you see any mistakes or outdated information please let us know. Thanks!