the selected property doesn't work in angular 4. for example if I do a loop
<select multiple >
<option *ngFor="let opt of model" selected>
opt.name
</option>
and there is 10 option it is only going to select the last element. This happens to me in any project that I do from angular. Any for that I put, and if I put selected it does not select all as it should
You can use the following:
Although the ideal would be to use a form, associate the select with a value (an array) that you have in your controller and let Angular select the options that match.