-
Notifications
You must be signed in to change notification settings - Fork 27.4k
Update to Angular 1.4 breaks directives that manipulate ngOptions data #13145
Comments
Hi All Please Remove my Email from Group Thanks On 10/21/2015 7:41 PM, Rouven Weßling wrote:
Thanks & Regards Cyber Infrastructure (P) Limited, [CIS] *(CMMI Level 3 Certified)* Central India's largest IT Services company. Ensuring the success of our clients and partners through our highly www.cisin.com | +Cisin https://plus.google.com/+Cisin/ | Linkedin DISCLAIMER: INFORMATION PRIVACY is important for us, If you are not the |
@realityking This is because the whole ngOptions logic is now inside a new directive, which means adding the attribute doesn't trigger the behavior anymore. I think this is missing from the changelog. I'm afraid this kind of manipulation simply doesn't work anymore. @akhileshtiwari123 It's possible that you are watching the angular repo. If so, please go to the repo and remove yourself. |
We are running into an issue with ngOptions in a directive as well but haven't narrowed it down. We have a directive that outputs "controls" using an ngRepeat. Each control has it's own isolated scope. Everything works fine, except dropdowns using ngOptions. The values are repeated. They only exist once in the scope value, but they are output twice by Angular, and the objectid's are duplicated as well so they point to the same instance. It doesn't break binding to the ng-model but it makes the values show up duplicate in the dropdown. |
@dustinhorne, your problem sounds like a duplicate fo #12190 (comment) and must have been already fixed in master with 53cb88a. |
@gkalpak - Thank you much, Confirmed, that snapshot fixed the problem. Thanks again! |
…tribute Caused by 7fda214 Closes angular#13145
I think there's some subtle difference in the way scopes work between 1.3 and 1.4, but I couldn't find anything in the changelogs.
In 1.3 we use a directive like the following to add data to a select element. We don't put the entire element into the directive, as that breaks the
for
attribute, it's also not that easy to handle with ngModel.Plunkr: http://embed.plnkr.co/COWqvLE14hFHnioHn9dP/preview
The text was updated successfully, but these errors were encountered: