Start with checked radio button

I would like to check by default one of my two radio button on my page, the problem I’m not able to do it.
This is my html and nothing that I tryed worked. checked, checked=true, [checked]="true" … nothing.
How is it possible to do a such basic thing?

Thank you

 <ion-list radio-group [(ngModel)]="mode" (ionChange)="select_mode()">
      <ion-item>
        <ion-label>Take away</ion-label>
        <ion-radio value="takeAway"></ion-radio>
        <ion-avatar item-start>
            <img src="../../assets/img/bag.png" style="width: 40px;">
        </ion-avatar>
      </ion-item>
      <ion-item>
        <ion-label>Consumo in loco</ion-label>
        <ion-radio value="inPlace"></ion-radio>
        <ion-avatar item-start>
            <img src="../../assets/img/sandwich_1.png" style="width: 40px;">
        </ion-avatar>
      </ion-item>
    </ion-list>

try to start your ngModel with the value that you would like to set as default.

Eg.:
public mode:string = 'takeAway'

1 Like