Ionic4 - Segment


I am trying out ionic4 beta, recently i just found ion-segment (ionChanged) event is not passing ion-segment-button value
Anyone has already got this error and could able to resolve it ?

<ion-segment [(ngModel)]=‘currentTab’ (ionChange)=“segmentChanged($event)”>

private segmentChanged(segment: any) {
console.log('Tab changed: ’ + JSON.stringify(segment))

Tab changed: {“isTrusted”:false}


not sure that’s your error but the first thing I see is that your method segmentChanged should be public not private as it is use from your template


i made it as public and it is the same. As i mentioned the event is triggering but the $event what i am receiving on the function is {“isTrusted”:false}.
i appreciate your help.


second thing you could try, remove the JSON.stringify in your console.log

 console.log('Tab changed’, segment);