-
Notifications
You must be signed in to change notification settings - Fork 27.4k
feat(currencyFilter): add numbers after dot count parameter #3642
Conversation
@btford how can I pick value from |
So we can format currency numbers like this: expect(currency(1234.5678, "USD$")).toEqual('USD$1,234.57') expect(currency(1234.5678, "rub", 3)).toEqual('rub1,234.568') expect(currency(1234.5678, "rub", 0)).toEqual('rub1,234') The last case is usual for Rubles for example.
@btford @IgorMinar got it. Just updated with defaults from currencySymbols. |
I'm sorry, but I wasn't able to verify your CLA signature. CLA signature is required for any code contributions to AngularJS. Please sign our CLA and ensure that the CLA signature email address and the email address in this PR's commits match. If you signed the CLA as a corporation, please let me know the company's name. Thanks a bunch! PS: If you signed the CLA in the past then most likely the email addresses don't match. Please sign the CLA again or update the email address in the commit of this PR. |
currencyFilter accepts number of decimals to round off to Closes angular#3642
currencyFilter accepts number of decimals to round off to Closes angular#3642
currencyFilter accepts number of decimals to round off to Closes angular#3642
currencyFilter accepts number of decimals to round off to Closes angular#3642
02dc2aa
to
fd2d6c0
Compare
cad9560
to
f294244
Compare
abdaab7
to
30996f8
Compare
e8dc429
to
e83fab9
Compare
So we can format currency numbers like this:
expect(currency(1234.5678, "USD$")).toEqual('USD$1,234.57')
expect(currency(1234.5678, "rub", 3)).toEqual('rub1,234.568')
expect(currency(1234.5678, "rub", 0)).toEqual('rub1,234')
The last case is usual for Rubles for example.
There is also a target to remove hardcoded values from source.