Beta 3, ion-radio checked not working anymore [SOLVED]


Am I the only one that has issue with beta 3 and ion-radio checked properties?

Even hardcoded value does not put any check mark

Ok, forget it. It seems the way to do it is using the ngModel.

sorry about that

@icarus_31 can you provide sample code on how you achieved this? I’m having the same issue and haven’t been able to figure it out yet.

I am able to save the selected ion-radio item to the DB just fine and go back to the parent page. But when I navigate back to the child page I want to show the “checked” option.

Hi @gigocabrera,

What I did is nothing fancy:


  <ion-list radio-group [(ngModel)]="myModel">
      <ion-radio value="valueA"></ion-radio>      

      <ion-radio value="valueB"></ion-radio>

      <ion-radio value="valueC"></ion-radio>


onPageWillEnter() {
   // in my case, I get the previously saved selection from the local storage
   myModel = value from localstorage

Hope that help

@icarus_31 you’re awesome man :+1: Thank you very much for your help :pray:
I’ve been pulling my hair for 2 days now trying to get this to work. What I was missing was this part
myModel = value from localstorage