I am trying to select first option in ionic select I write condition with indexs which if index is 0 checked = true still not working here is my Code:
<ion-item>
            <ion-label>Venue Name</ion-label>
            <ion-select [(ngModel)]="venue_name">
                <ion-option *ngFor="let title of venues; let i = index" value="title.venue_id" checked="(i == 0) ? true : null">
                    {{title.venue_name}} 
                </ion-option>
            </ion-select>
        </ion-item>
                This
value="title.venue_id" checked="(i == 0) ? true : null"
Should be
[value]="title.venue_id" [selected]="i===0"
WORKING DEMO
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With