currency filter now has a default fraction size

This commit is contained in:
Gerard 2018-11-26 11:22:22 +01:00
parent e8b9e509b1
commit b56e548656
1 changed files with 2 additions and 0 deletions

View File

@ -7,6 +7,8 @@ import ngModule from '../module';
*/
export default function currency() {
return function(input, symbol, fractionSize) {
if (!fractionSize)
fractionSize = 2;
if (typeof input == 'number' && fractionSize) {
input = input.toFixed(fractionSize);
return `${input} ${symbol}`;