@david_bc wrote:
Hello everyone,
I have dynamis ion-select combined with ion-option
example :
<ion-item no-lines *ngFor="let attr of attributes"> <ion-label>{{attr.key}}</ion-label> <ion-select [formControlName]="attr.key"> <ion-option *ngFor="let option of attr.values" selected="{{(attr.values.length > 1) ? false : true }}" [value]="option">{{option}}</ion-option> </ion-select> </ion-item>
I try to set the ion-option selected as default when my array values size is equals to 1.
That didn’t work. Do you have a way to set default selected value to ion-option ?
Ty in advance
Posts: 1
Participants: 1