We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is it possible to display amounts like 7123456.789 as 7,123,456.789 throughout the site?
The text was updated successfully, but these errors were encountered:
I'm using this angular filter on reddcoin.rocks to display human readable amounts:
reddcoinRocks.filter('humanize', function(){ return function(number, decimals, decPoint, thousandsSep) { decimals = isNaN(decimals) ? 2 : Math.abs(decimals); decPoint = (decPoint === undefined) ? '.' : decPoint; thousandsSep = (thousandsSep === undefined) ? ',' : thousandsSep; var sign = number < 0 ? '-' : ''; number = Math.abs(+number || 0); var intPart = parseInt(number.toFixed(decimals), 10) + ''; var j = intPart.length > 3 ? intPart.length % 3 : 0; return sign + (j ? intPart.substr(0, j) + thousandsSep : '') + intPart.substr(j).replace(/(\d{3})(?=\d)/g, '$1' + thousandsSep) + (decimals ? decPoint + Math.abs(number - intPart).toFixed(decimals).slice(2) : ''); }; });
{{balance | humanize:2:'.':','}}
Sorry, something went wrong.
Is this project still active, why no response in 3 months?
No branches or pull requests
Is it possible to display amounts like 7123456.789 as 7,123,456.789 throughout the site?
The text was updated successfully, but these errors were encountered: