Printing a number out in AureliaJS with one percision and comma's

19 Views Asked by At

I have a number like so that returns from the printOutFunction below:

1024248.71345

I need it to print out like this:

1,024,248.7

I am unable to get the comma's working using this:

${printOutFunction(variablesToNumber) | number:'1.1-1':'comma' & signal:SendSignalOut}

or this:

${printOutFunction(variablesToNumber).toLocaleString(undefined, { minimumFractionDigits: 1, maximumFractionDigits: 1 }) & signal:SendSignalOut}

But the currency version works like this:

${printOutFunction(variablesToNumber) | number:'currency':'USD':true:'1.1-1':'comma' & signal:SendSignalOut}

Output is $1,024,248.7

How do I get this to finally be fixed?

0

There are 0 best solutions below