I am making an e-commerce app. On my home page i am displaying my products by category. i am using both ion-segment and ion-slides so that user will be able to scroll and select both at a time . it was fine when i had three categories , all were displaying at home but when i increased category other categories are behind screen . categories products are displaying fine but category name is inside and not visible. i want to scroll both category name and products displayed at same time on screen. that is i want to get the active segment visible on the screen, when the segment is off screen .thanks in advance :-)

<ion-content>
<ion-segment color="dark" [(ngModel)]="tabs" style="width:640px;">
<ion-segment-button *ngFor="let i of productcategory" (click)="selectTab(i)" value="{{i.inc}}" >{{i.category_name}}</ion-segment-button>
<div id="slide" class="slide"></div>
</ion-segment>
<ion-slides #pageSlider (ionSlideWillChange)="changeWillSlide($event)">
<ion-slide *ngFor="let i of productcategory">
<ion-list>
<div *ngFor="let pr of products; let i=index" text-wrap class="swipe-tabs">
<div class="swipe-tabs-1">
<img src="http://example.com/{{pr.tbl_product_image}}" />
<button ion-button (click)="removefromcart(pr,i)">-</button>
<button ion-button color="light" *ngIf="check">{{quan[i]}}</button>
<button ion-button color="light" *ngIf="!check">0</button>
<button ion-button (click)="addToCart(pr,i)">+</button>
</div>
<div class="swipe-tabs-2">
<h2>{{pr.tbl_product_name}} </h2>
<ion-list radio-group >
<ion-item *ngFor="let p of pr.pricevariant; let j=index;">
<ion-label>{{p.weight}} <span class="colr-red">₹ {{p.dprice}}</span></ion-label>
<ion-radio [value]="p.weight" (ionSelect)="getdata(pr,p,i,j)" ></ion-radio>
</ion-item>
</ion-list>
</div>
<div class="border-hr"></div>
</div>
</ion-list>
</ion-slide>
</ion-slides>