Ion-select with multiple=true not correctly initialised


The ion-select is correctly initializing for a single selection, but not for multiple.
In my html template I have:

           <ion-select name="optionselect" id="optionselect" multiple="true" [(ngModel)]="customer.optionselect">
              <ion-option value="option1">Option 1</ion-option>
              <ion-option value="option2">Option 2</ion-option>

In my typescript component I have this object:

customer = {
name: ‘’,
optionselect: ‘option1,option2’,

When I run, none of the options is selected.

Am I doing something wrong? Thx!!


Try optionselect: ['option1','option2'].


OK, that’s working! Thanks a lot!! /Frank