I'm using the Ionic 1.3.16 version currently. He i need to select multiple options in my select control.
Here my ionic HTML code:
<div class="list">
<label class="item item-input item-select">
<div class="input-label">
Lightsaber
</div>
<select>
<option>Blue</option>
<option selected>Green</option>
<option>Red</option>
</select>
</label>
</div>
You are missing the value
attribute in select
option, because when you select option it will reflect to the ng-model
.Additionally to select multiple you need to add multiple
attribute in your select.
Markup
<select ng-model="selectedValues" multiple>
<option ng-repeat="option in options" value="{{option.value}}">{{option.name}}</option>
</select>
{{selectedValues}}
Just add the multiple
attribute in the select field.
<div class="list">
<label class="item item-input item-select">
<div class="input-label">
Lightsaber
</div>
<select multiple="multiple">
<option>Blue</option>
<option selected>Green</option>
<option>Red</option>
</select>
</label>