| 1. |
How To Convert Currency In Aurelia? |
|
Answer» Convert Currency :This is an example of currency FORMATTING. You will notice that the concept is the same as in above example. First we need to install numeral LIBRARY from command prompt. C:UsersusernameDesktopaureliaApp>jspm install numeral Converter will set currency FORMAT. converters.js IMPORT numeral from 'numeral'; export class CurrencyFormatValueConverter View-model will just generate random number. We will use this as currency value and update it every second. app.js export class App Our view will show the randomly generated number transformed as a currency. app.html ${myCurrency | currencyFormat}
Convert Currency :This is an example of currency formatting. You will notice that the concept is the same as in above example. First we need to install numeral library from command prompt. C:UsersusernameDesktopaureliaApp>jspm install numeral Converter will set currency format. converters.js import numeral from 'numeral'; export class CurrencyFormatValueConverter View-model will just generate random number. We will use this as currency value and update it every second. app.js export class App Our view will show the randomly generated number transformed as a currency. app.html ${myCurrency | currencyFormat}
|
|