The code below uses segments from ionic 3. docs show the use of ngSwitch, ngModel. but I would like to simply swipe on the segment and switch to another segment tab. How can I achieve this?
I am not interested in swiping the tabs at the top but by swiping on the content i would like to change the segment tab.
<ion-content padding>
<div>
<ion-segment [(ngModel)]="abc">
<ion-segment-button value="Segment1">
Segment Title
</ion-segment-button>
<ion-segment-button value="segment2">
Segment Title
</ion-segment-button>
</ion-segment>
</div>
<div [ngSwitch]="abc">
<ion-list *ngSwitchCase="'segment2'" class="list-fixed">
<ion-item>
<ion-thumbnail item-start>
<img src="assets/imgs/1.jpg">
</ion-thumbnail>
<h2>List Item 1</h2>
<p>List Item Subtitle</p>
<button ion-button clear item-end>View</button>
</ion-item>
</ion-list>
<ion-list *ngSwitchCase="'segment1'" class="list-fixed">
<ion-item>
<ion-thumbnail item-start>
<img src="assets/imgs/3.png">
</ion-thumbnail>
<h2>List Item Title 1</h2>
<p>Subheading</p>
<button ion-button clear item-end>View</button>
</ion-item>
</ion-list>
</div>

panleftandpanrightevents for detecting the swipe gestures. - David