-
Notifications
You must be signed in to change notification settings - Fork 27.4k
ngPluralize example has problem when a value >3 is deleted #10836
Comments
yeah, that's kind of weird --- @petebacondarwin do you think ngPluralize should support signed values by default? or maybe there's a better way |
FWIW, I can't reproduce on Chrome/Firefox on Windows, but it sounds reasonable to (properly) handle negative values as 0. |
you can see it in chrome and safari on a mac, i expect you can see it on windows too |
I've the problem in Windows Chrome
|
This example start assuming that blank is zero and this assumption remain
|
I can reproduce it with 4 or more but not 3. Weird... |
I think the problem is that |
When `lastCount` was evaluated to an non-numeric value (e.g. "other") and `count` was evaluated to `NaN` (e.g. `null`/`undefined`), the text content would be (wrongly) based on the previous template. This commits makes sure the text content is updated correctly. In order to customize the message shown upon `null`/`undefined` one can specify a `'NaN'` property on the `when` exression object. Closes angular#10836
When `lastCount` was evaluated to an non-numeric value (e.g. "other") and `count` was evaluated to `NaN` (e.g. `null`/`undefined`), the text content would be (wrongly) based on the previous template. This commits makes sure the text content is updated correctly. In order to customize the message shown upon `null`/`undefined` one can specify a `'NaN'` property on the `when` exression object. Closes angular#10836
When `lastCount` was evaluated to an non-numeric value (e.g. "other") and `count` was evaluated to `NaN` (e.g. `null`/`undefined`), the text content would be (wrongly) based on the previous template. This commits makes sure the text content is updated correctly. In order to customize the message shown upon `null`/`undefined` one can specify a `'NaN'` property on the `when` exression object. Closes angular#10836
✨ Don't forget to label / milestone everyone! ✨ |
+1 Narretz! |
In this page
https://code.angularjs.org/1.3.10/docs/api/ng/directive/ngPluralize
Change the number of peoples to 3 or more and then clear the field.
typing 3 and cleaning get -2 other peoples...
The text was updated successfully, but these errors were encountered: