currency.js addon for Ember.
npm install --save ember-currencyember g ember-currency
import currency from 'currency';
export default DS.Model.extend({
quantity: DS.attr('number'),
shareCost: DS.attr('number'),
value: function() {
return currency(this.get('shareCost')).multiply(this.get('quantity')).format();
}.property('quantity', 'shareCost'),
})git clonethis repositorynpm installbower installember server- Visit your app at http://localhost:4200.
ember testember test --server
ember build
For more information on using ember-cli, visit http://www.ember-cli.com/.