Skip to content
New issue

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

Currency pipe documentation default for maxFractionDigits is 3, should be 2, minFractionDigits is 0, should be 2 #27414

Closed
ghost opened this issue Dec 3, 2018 · 1 comment
Milestone

Comments

@ghost
Copy link

ghost commented Dec 3, 2018

📚 Docs or angular.io bug report

Description

The currency pipe's documentation says the maxFractionDigits defaults to 3, but it looks like this defaults to 2. It also says the minFractionDigits default is 0, but it looks like it should be 2.

🔬 Minimal Reproduction

What's the affected URL?**

https://angular.io/api/common/CurrencyPipe

Reproduction Steps**

This StackBlitz shows the default vs hardcoding what is in the docs for digitsInfo.

<p>
  {{ 111.11111 | currency }} <!-- Shows $111.11 -->
</p>
<p>
  {{ 111.11111 | currency:'USD':true:'1.0-3' }} <!-- Shows $111.111 -->
</p>
<p>
  {{ 111 | currency }} <!-- Shows $111.00 -->
</p>
<p>
  {{ 111 | currency:'USD':true:'1.0-3' }} <!-- Shows $111 -->
</p>

Expected vs Actual Behavior**

The docs should reflect the actual default.

Anything else relevant?

This was noticed after #27079 or else I would have addressed it with that issue, but it's the same type of issue.

**Edits
Expanded to include minFractionDigits

**Edits 2
The tests already cover the defaults, so the future PR will not add any.

@ghost ghost changed the title Currency pipe documentation default for maxFractionDigits is 3, should be 2 Currency pipe documentation default for maxFractionDigits is 3, should be 2, minFractionDigits is 0, should be 2 Dec 3, 2018
@ngbot ngbot bot added this to the needsTriage milestone Dec 11, 2018
mhevery pushed a commit that referenced this issue Dec 14, 2018
Change the docs to reflect the actual default values

Fixes #27414
PR Close #27417
ngfelixl pushed a commit to ngfelixl/angular that referenced this issue Jan 28, 2019
…27417)

Change the docs to reflect the actual default values

Fixes angular#27414
PR Close angular#27417
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 14, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant