Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

AngularJS number $filter issue for numbers with 20 and 21 digits #11183

Closed
rajeshroshan opened this issue Feb 25, 2015 · 1 comment
Closed

AngularJS number $filter issue for numbers with 20 and 21 digits #11183

rajeshroshan opened this issue Feb 25, 2015 · 1 comment

Comments

@rajeshroshan
Copy link

I use AngularJS $filter to format a number to 2 decimal places per the code below

$filter('number')(n, 2)

When 'n' is 20 or 21 digits long, the result of the above expression is NaN.

No issues when 'n' is less than 20 digits or more than 21 digits (for more than 21 digits, the above expression is displayed in scientific notation)

Any thoughts on how to fix the NaN issue for 20 and 21 digit numbers?

@pkozlowski-opensource
Copy link
Member

@rajeshroshan thnx for reporting. We've got an issue already for this one (#8674), unfortunately it is not trivial to fix :-/

Closing as duplicate of #8674 to centralise the discussion.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants