How to [(ngModel)] with ion-radio

I try this code, But it doesn’t work.

<ion-list radio-group [(ngModel)]="case">
      <ion-list-header>
        Case
      </ion-list-header>

      <ion-item>
        <ion-label>Case 1</ion-label>
        <ion-radio value="1"></ion-radio>
      </ion-item>

      <ion-item>
        <ion-label>Case 2</ion-label>
        <ion-radio value="2"></ion-radio>
      </ion-item>

    </ion-list>

OK i got the answer.

   <ion-list radio-group [(ngModel)]="case" name="case" required>
      <ion-list-header>
        Case
      </ion-list-header>

      <ion-item>
        <ion-label>Case 1</ion-label>
        <ion-radio value="1"></ion-radio>
      </ion-item>

      <ion-item>
        <ion-label>Case 2</ion-label>
        <ion-radio value="2"></ion-radio>
      </ion-item>

    </ion-list>
2 Likes