Based on Semantic-UI docs, https://semantic-ui.com/modules/dropdown.html#multiple-selections
I have following code inside angular2 template:
<select id="thickness" name="thick" [(ngModel)]="form.thickness" multiple="multiple" class="ui multiple dropdown selection">
<option value="">Выбрать</option>
<option value="100">100 mm</option>
<option value="150">150 mm</option>
<option value="200">200 mm</option>
<option value="250">250 mm</option>
<option value="300">300 mm</option>
<option value="375">375 mm</option>
<option value="400">400 mm</option>
</select>
I'd like to get array of selected values from Select
to angular model form.thickness
However, I am getting empty array.
inside ngOnInit
I have $('#thickness').dropdown();
console.log($('#thickness').dropdown('get value'));
gives empty array;
How to get values from dropdown multiple selection?
get value
did not work for me, butget values
did. – Benildas