paolodm/angular-selectize

two selectize elements on the same page result in the second one having no options.

Opened this issue · 0 comments

I have two arrays of objects in my controller, $scope.markets and $scope.mts

both are put on the page in the same way:

                                            <select id="selectMarket" placeholder="Select Market for Flight" 
                                                ng-options='market.name for market in markets' 
                                                ng-model='selectedMarket'
                                              selectize="{ labelField: 'name', valueField: 'id' }">
                                            </select>

and

                                            <select id="selectMT" placeholder="Select Media Types for Flight" 
                                                ng-options='mt.name for mt in mts' 
                                                ng-model='selectedMediaTypes'
                                              selectize="{sortField: 'name'}"> 
                                            </select>

but it appears that ngOptions is not running for the second, as it never has any options.

Anything I need to do special to get more than one angular-selectize on the page?