- 
                Notifications
    You must be signed in to change notification settings 
- Fork 80
Open
Description
Hi there.
I am using this and I am very happy with it.
However I am not sure how to go about selecting the default choice for the picker...
Currently i do this:
<select class="m-l-20 pull-right selectpicker" selectpicker ng-model="currentLanguage">
    <option ng-repeat="language in defaultLanguage" data-content="<span class=''><img src='/assets/img/flags/{{language.Value}}.png'/> {{language.Name}}</span>" value="{{language}}"> </option>
    <option ng-repeat="language in campaign.Languages" data-content="<span class=''><img src='/assets/img/flags/{{language.Value}}.png'/> {{language.Name}}</span>" value="{{language}}"> </option>
</select>
But it seems a very nasty way of doing it.. Basically I have my Languages as objects in an array (campaign.Languages) but in order to have the first language selected by default I have to add the first and do ng-repeat on an array with 1 single item which i initialize it to be the first language of the main language array.
There must be a better way of doing this..
Metadata
Metadata
Assignees
Labels
No labels