ember-currencies-and-format-money v4.1.1
ember-currencies-and-format-money
ember-currencies-and-format-money is an addon that enables you format money amounts in your Ember.js application.
Installation
cd your-project-directory
ember install ember-currencies-and-format-moneyUsage
You can use format-money helper in your hbs files by passing a parameter money object with attributes amount and currency. If currency is not set, then TRY is default currency.
{{format-money (hash amount=1000 currency='USD') }}By default currency is visible. If you want to hide currency, you can set currencyHidden=true parameter.
{{format-money (hash amount=1000 currency='USD') currencyHidden=true }}You can import formatMoneyAmountByCurrency function and use it by passing amount, currencyValue and currencyHidden parameters.
import { formatMoneyAmountByCurrency } from 'ember-currencies-and-format-money/format-amount';
let amount = 1550;
let currencyValue = 'USD';
let currencyHidden = false;
let result = formatMoneyAmountByCurrency(amount, currencyValue, currencyHidden);
console.log(result); // $15.50Checkout live examples at ember-currencies-and-format-money demo page
License
This project is licensed under the MIT License.
6 years ago
6 years ago
6 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago