When I do number formatting using Javascript, after 15 digits it's rounding off the number. As we are working on currency, don't want this rounding to happen. We are using angular as our client-side lib, tried using angular format number and format currency as well, but didn't help. Can anyone suggest any way to fix this issue?
We need the number to be formatted as per the current locale(like if the user is inputting 10000, we need to format it as per the locale set to 10,000) but don't want this rounding issue to happen for big numbers(those with a value above - 9999999999999999).
const number = 9999999999999999;
console.log(number.toLocaleString('en-US'));