Ionic segment modal problem


#1

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


#2

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

That might do the trick.


#3

Can you try for that your code alter

yours


#4

thanks this solve my problem