hello,
i’m looking to do default selected value to my option. when i press on the button to choose it be by defaulted selected to the first item of the options.
this is my code
<ion-list> <ion-item> <ion-label >choose course</ion-label> <ion-select [(ngModel)]="courseSelect" (ionChange)="onCourseChange($event)" [ngStyle]="{'direction':'rtl'}" okText="בחר" cancelText="בטל"> <ion-option *ngFor="let course of coursesNames" [value]="course" selected>{{course}}</ion-option> </ion-select> </ion-item> <ion-item *ngIf="courseSelect" class="mar"> <ion-label >choose lecture</ion-label> <ion-select [(ngModel)]="lectureSelect" (ionChange)="onLectureChange($event)" okText="בחר" cancelText="בטל"> <ion-option [ngStyle]="{'direction':'rtl'}" *ngFor="let lecture of LecturesNames" [value]="lecture">{{lecture}}</ion-option> </ion-select> </ion-item>
i wrote "selected but it’s not doing nothing.