Hey guys,

the title doesnt really describe much what is going on so I ll try. I am 
using a directive which I want to call multiple times on multiple select 
elements using ng-options.

When I only use the directive on one select statement it seems to work 
properly. The moment I add the directive to a second select (which is being 
generated by another directive) it stops working.

For example if I use the following template it works...

        template: '<select name="appointment_date" 
ng-model="appointment.appointment_date" ' +
                    'ng-options="date for date in appointmentDates">'+
                        '<option value="" selected>Please select a 
date</option>'+
                  '</select>',

But if I use this one it stops working, meaning my second select options is 
blank.

        template: '<select name="appointment_date" 
ng-model="appointment.appointment_date" ' +
                    'ng-options="date for date in appointmentDates" 
appointment-dropdown 
ng-change="typeUpdate()>'+
                        '<option value="" selected>Please select a 
date</option>'+
                  '</select>',

This is very hard to explain so please just look at the plunker. Notice I 
have commented out the template that is working. If you want to see the 
behavior change just toggle the template you are commenting.

The way this works is I have some dropdowns. One original dropdown is 
shown, btu the other drop downs will get shown as the ones already 
displayed change

http://plnkr.co/edit/HaJvsIOHjpnAVW5DFaft?p=preview

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to