Skip to content

DecimalPipe.transform() is not formatting correctly on IE11 #17319

@aldo-roman

Description

@aldo-roman

I'm submitting a ...

[X] bug report
[ ] feature request
[ ] support request

Current behavior
When using the 'number' pipe (which internally is DecimalPipe), it formats correctly
When using the output of DecimalPipe.transform(9999999.99, '1.2-2'), it misses the million separator
9999999.99 gets formated as -> 9999,999.99

Expected behavior
9999999.99 gets always formated as -> 9,999,999.99

Minimal reproduction of the problem with instructions
On IE 11 only:
http://plnkr.co/edit/PbkbaarXmQjuSO7kNe3e?p=preview
Works well on Chrome

What is the motivation / use case for changing the behavior?
I need a custom pipe that reuses DecimalPipe with '1.2-2' scale.
On IE11 the number is wrong formatted

Please tell us about your environment:
Windows 7, IE11

  • Angular version: 4.1.X

  • Browser: IE11

  • Language: Typescript 2.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: i18nIssues related to localization and internationalizationtype: bug/fix

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions