A newbie with ionic v3. I have three ionic pages which i am trying to display inside of ionic segments. I want to keep the functionality of the pages segregated for easier maintainability. For now i haven't found a workaround since ionic won't allow more than one ion-content in a page. Any other approach/suggestions/workarounds?
I Have tried setting the pages as tabRoots and invoking them in the segment page
The three pages look like:
<ion-content padding>
page design and api calls etc..
</ion-content>
The main page for displaying the tabs looks like: manage-request.html
<app-header heading="Manage Requests"></app-header>
<ion-content padding>
<ion-segment [(ngModel)]="relationship" color="primary">
<ion-segment-button text-center value="travelrequest"[root]="tab1Root">
Travel Request
</ion-segment-button>
<ion-segment-button value="approverequest" [root]="tab2Root">
Approve Request
</ion-segment-button>
<ion-segment-button value="approveexception" [root]="tab3Root">
Approve Exception
</ion-segment-button>
</ion-segment>
</ion-content>
<app-footer isCheckStatus="true"></app-footer>
manage-request.ts
export class ManageRequestPage{
@ViewChild("manageTabs") manageTabs: Tabs;
tab1Root = TravelRequestPage;t
tab2Root = ApproveRequestPage;
tab3Root = ApproveExceptionRequestPage;
}
Expected result: contents of the pages are displayed when i switch the tabs of the ionic segments