Skip to content

docs: more info on currency digits - #24661

Closed
cexbrayat wants to merge 1 commit into
angular:masterfrom
cexbrayat:fix/currency-docs
Closed

cexbrayat wants to merge 1 commit into
angular:masterfrom
cexbrayat:fix/currency-docs

Conversation

@cexbrayat

Copy link
Copy Markdown
Member

Adds an example of using the currency pipe with a currency that has no cents like CLP,
which will format the amount with no digits if digitsInfo is not provided:

<!-- outputs CA$14.00 -->
{{ 14 | currency:'CAD' }}
<!-- outputs CLP14 -->
{{ 14 | currency:'CLP' }}

Amends the docs, adds an example and fix an error with a current example.

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

[ ] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[x] Documentation content changes
[ ] angular.io application / infrastructure changes
[ ] Other... Please describe:

What is the current behavior?

See #24141 (comment)

What is the new behavior?

Adds a small example of using the currency pipe with no digitsInfo and with a currency that has no cents to illustrate that the formatting done by the pipe by default follows the ISO 4217 specification.

Does this PR introduce a breaking change?

[ ] Yes
[x] No

Other information

@cexbrayat cexbrayat mentioned this pull request Jun 25, 2018
2 of 3 tasks
@ocombe ocombe added comp: docs area: common Issues related to APIs in the @angular/common package target: patch This PR is targeted for the next patch release labels Jun 25, 2018
@jbogarthyde

Copy link
Copy Markdown
Contributor

See also this pending PR on rounding behavior:
#24303

Adds an example of using the `currency` pipe with a currency that has no cents like CLP,
which will format the amount with no digits if `digitsInfo` is not provided:

    <!-- outputs CA$14.00 -->
    {{ 14 | currency:'CAD' }}
    <!-- outputs CLP14 -->
    {{ 14 | currency:'CLP' }}

Amends the docs, adds an example and fix an error with a current example.
@brandonroberts

Copy link
Copy Markdown
Contributor

@vicb will you provide an approval for this PR?

@mhevery

mhevery commented Jul 17, 2018

Copy link
Copy Markdown
Contributor

@mhevery mhevery added the action: merge The PR is ready for merge by the caretaker label Jul 17, 2018
vicb pushed a commit that referenced this pull request Jul 20, 2018
Adds an example of using the `currency` pipe with a currency that has no cents like CLP,
which will format the amount with no digits if `digitsInfo` is not provided:

    <!-- outputs CA$14.00 -->
    {{ 14 | currency:'CAD' }}
    <!-- outputs CLP14 -->
    {{ 14 | currency:'CLP' }}

Amends the docs, adds an example and fix an error with a current example.

PR Close #24661
@vicb vicb closed this in 270176b Jul 20, 2018
cexbrayat added a commit to cexbrayat/angular that referenced this pull request Jul 22, 2018
Will avoid errors in examples like the one fixed in angular#24661
vicb pushed a commit that referenced this pull request Jul 23, 2018
Will avoid errors in examples like the one fixed in #24661

Closes #25028
vicb pushed a commit that referenced this pull request Jul 23, 2018
Will avoid errors in examples like the one fixed in #24661

Closes #25028
@jenniferfell jenniferfell added the state: community Someone from the Angular community is working on this issue or submitted this PR label Oct 9, 2018
@angular-automatic-lock-bot

Copy link
Copy Markdown

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

action: merge The PR is ready for merge by the caretaker area: common Issues related to APIs in the @angular/common package cla: yes state: community Someone from the Angular community is working on this issue or submitted this PR target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants