-
Notifications
You must be signed in to change notification settings - Fork 27.4k
Conversation
It should pass through the currency number pattern from the current locale Closes angular#5674
Thanks for the PR! Please check the items below to help us merge this faster. See the contributing docs for more information.
If you need to make changes to your pull request, you can update the commit with Thanks again for your help! |
So there are actually a couple of things that are going on here. The first is that there was a bug in The second is that we should be able to provide the I reworked and reworded the tests to make it clear what was being tested here. I think that mixing of @caitp, @park9140 and @genuinefafa - does this make sense? |
Yes, it does. It makes absolute sense. |
Looks good to me. |
Heh, I opened a PR for optional rounding in the currency filter before seeing this - this would be incredibly useful! |
I should add two comments though - for negative values, there is a modification that needs to be made so one can round to whole numbers with the currency filter. In this line in the formatNumber function: if (fractionSize && fractionSize !== "0") formatedText += decimalSep + fraction.substr(0, fractionSize); I recommend adding In addition, I propose that the currency filter's rounding value should be optional, and it should fallback to the previous behavior if omitted. Implementation of these two features can be observed in #8391. |
|
@petebacondarwin excelent! that's excelent... 👍 |
What's going on with this PR? I just updated to latest angularjs#1.2.25 and this is not included. 😢 |
@petebacondarwin It looks like this is only pulled into master and thus only 1.3 is going to have it? Can we get it added to 1.2? |
See #5672 and #5674