Ionic segment modal problem

i have ion-segment with 3 tabs

  <ion-segment [(ngModel)]="data.recType"(ngModelChange)="stateChange($event)">
    <ion-segment-button value="s">
      1
    </ion-segment-button>
    <ion-segment-button value="m">
      2
    </ion-segment-button>
    <ion-segment-button value="t">
      3
    </ion-segment-button>
  </ion-segment>

the problem is all of time if i select segment with value “t” it return value “m”
any suggestion please

The docs suggest (ionChange) as opposed to (ngModelChange).

That might do the trick.

1 Like

Can you try for that your code alter

yours

thanks this solve my problem