Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

ngOptions with model = 0 and options loaded later #10213

Closed
csbenjamin opened this issue Nov 25, 2014 · 9 comments
Closed

ngOptions with model = 0 and options loaded later #10213

csbenjamin opened this issue Nov 25, 2014 · 9 comments

Comments

@csbenjamin
Copy link

Look at this jsfiddle
http://jsfiddle.net/22djvuc3/1/

When I set a model as number 0 and have the options set in timeout, ng-options doesn't recognize the model as a valid option.

@Narretz
Copy link
Contributor

Narretz commented Nov 25, 2014

Thanks for reporting. Looks like the same bug as #9700

@csbenjamin
Copy link
Author

@Narretz Looks different for me. In #9700, ngOptions select the wrong value. Here, ngOptions doesn't select anything and only when the model = 0. If model=1 everything is fine. Do you think the same bug is causing these two different issues?

@Narretz
Copy link
Contributor

Narretz commented Nov 25, 2014

Since it's related to timeout and integers, I guess it's the same bug. But I'll reopen it just to be sure.

@Narretz
Copy link
Contributor

Narretz commented Nov 25, 2014

Alas, it's a duplicate of #9714 ;)
Fix in the works!

@Narretz Narretz closed this as completed Nov 25, 2014
@csbenjamin
Copy link
Author

yeah, this is the same bug :)

@guilbep
Copy link
Contributor

guilbep commented Dec 5, 2014

@Narretz I had the 'same' bug; I tested several version; and the breaking changes occurs between 1.2.25 (working http://jsfiddle.net/guilbep/Lvm2ftcx/) and 1.2.26 (not working http://jsfiddle.net/guilbep/8xmLb7kd/) See comments; when adding an additional value in the array it works; it's only the last value that is not set;

Question; Is that possible to port the change made in 1.3.x in 1.2.x (it works in 1.3.5 http://jsfiddle.net/guilbep/fnvjxfk4/) ?? I'm mainly using 1.2.x because of support to ie-8. I'd gladly make the change myself and then submit a pull-request. I used a timetout to simulate the way ngResource initialize object in my case;

Thanks!

@Narretz
Copy link
Contributor

Narretz commented Dec 5, 2014

We can definitely backport it to 1.2.x. However, there are still a number of similar bugs (when the model is not 0), so I'd like to fix them first, because it's possible that we need to make more changes which would obsolete the first fix.

@guilbep
Copy link
Contributor

guilbep commented Dec 5, 2014

@Narretz Fantastic; Thanks; Tell me if I could be of any help; adding additional test case for instance.

@guilbep
Copy link
Contributor

guilbep commented Dec 16, 2014

@Narretz any news/ need a pull request ? still not working on 1.2.28

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants