using angular-ui with select2 as follows:
<select ui-select2 ng-model="search.categories" multiple style="width:300px" data-placeholder="select category">
<option value="open" >open</option>
<option value="close" >close</option>
</select>
Where and how should I preselect options? By default selected option is only first.Somehow in controller?
Best Answer
For a simple
<select>
list it's easy:For
<input>
it gets trickier because you may need to add ainitSelection
option