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

Issue with '| currency ' while entering multiple 9's in angularJS1.2 with all Browsers #10609

Closed
kpranay opened this issue Dec 31, 2014 · 4 comments

Comments

@kpranay
Copy link

kpranay commented Dec 31, 2014

From number 9999999999999999 to 999999999999999999 showing value as 10,000,000,000,000,000.00 to 1,000,000,000,000,000,000.00 . From 9999999999999999999 to 99999999999999999999 showing NaN.00 . then onward showing result in expression from which not equal to entered number.(ex: For 999999999999999999999 showing 1e+21).

Sample :

<!doctype html>

<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.28/angular.js"></script>
<div ng-app="" ng-controller="test1">
    <input type="number" ng-model="fee">
    <p>amount: <span>{{fee | currency}}</span></p>
</div>
<script> function test1($scope) { $scope.fee=100; } </script>
</body>
@kpranay kpranay changed the title Issue with '| currency ' while entering multiple 9's in angularJS1.2 with all Issue with '| currency ' while entering multiple 9's in angularJS1.2 with all Browsers Dec 31, 2014
@pkozlowski-opensource
Copy link
Member

I believe that this is duplicate of #8674

@kpranay
Copy link
Author

kpranay commented Dec 31, 2014

sample code :

    <html>
    <head>
            <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.28/angular.js"></script>   
    </head>
        <body>

<div ng-app="" ng-controller="test1">
    <input type="number" ng-model="fee">
    <p>amount: <span>{{fee | currency}}</span></p>
</div>
       <script>
       function test1($scope)
       {
        $scope.fee=100;
             }
     </script>
</body>

@pkozlowski-opensource
Copy link
Member

@kpranay yeh, we do understand the problem but there is an issue for this opened already (#8674) and it has an associated PR (#/8705). Looking at the discussion in #8705 you can see that fix is not trivial, unfortunately.

Closing as duplicate of #8674

@kpranay
Copy link
Author

kpranay commented Dec 31, 2014

No. It's not copy of #8674 because in that case after 21 digits it is working fine and showing proper scientific notation form but in this case entering 21 9's showing 1e+21. which means 21 zeros after 1.

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

No branches or pull requests

2 participants