Radio button checked="true" is not working

Radio button checked=“true” is not working
below is my code

  <ion-row radio-group [(ngModel)]="donate_plan" (ionChange)="onChange(donate_plan)" >

  <ion-col col-6>
    
          <ion-item no-margin>
            <ion-label>Monthly</ion-label>
            <ion-radio value="30"  checked="true"></ion-radio>
          </ion-item>
          
   </ion-col>       
          
          
  <ion-col col-6>        
          <ion-item no-margin>
            <ion-label>Yearly</ion-label>
            <ion-radio value="365" ></ion-radio>
          </ion-item>
  </ion-col>  
  </ion-row>

Please help me out

What version of Ionic are you using?

In any case, you might need to put square brackets around checked. E.g.,

<ion-radio value="30" [checked]="true"></ion-radio>

Without the square brackets you are setting the value of checked to the string true, not the boolean value true.

HOpe this helps.

1 Like

Your model value might be overriding the checked value.

1 Like

not working on ionic 4 on my sie