Detect change on ion-segment


When using ion-segment, certain elements are not appearing ( images loaded locally in this case ).
I would like to detect that a segment has been changed to and then call a function.
I have tried:

Both in the<ion-segment>
and the <ion-segment-button>


Have you tried (ionChange)="onSegmentChange()" ?


Ahhh, yes, I did but only on the button.
<ion-segment (ionChange)="onSegmentChange()"> works!
Thank you!


i can implement it like you but in <ion-segment-buttons …>

<ion-segment [(ngModel)]=“configureTile” name=“configureTile” [ngModelOptions]="{standalone: true}" (ionChange)=“changeTileType()”>