Hi guys,
I have a simple problem, i have been trying to build a side-menu with a bottom tabs and it works.
My problem is when i navigate through the menu the taps disappear, i need to always show the tabs even if i went to another page from the menu ?
Here is a snippet from app.component.ts
// used for an example of ngFor and navigation
this.pages = [
{ title: 'HOME', component: TabsPage, icon: 'md-home' },
{ title: 'LOCKEROOM', component: LockerRoomPage, icon: 'md-chatbubbles' },
{ title: 'FEATURED', component: FeaturedPage, icon: 'md-star' },
{ title: 'OFFERS', component: OffersPage, icon: 'md-color-wand' },
{ title: 'PROMOTIONS', component: PromotionsPage, icon: 'md-briefcase' },
{ title: 'NOTIFICATIONS', component: NotificationsPage, icon: 'md-notifications-outline' }
];
openPage(page) {
this.nav.setRoot(page.component);
}
and Here is a snippet from app.html
<ion-list>
<button class="side-menu-list" color="secondary" icon-left menuClose ion-item
*ngFor="let p of pages" (click)="openPage(p)">`
<ion-icon class="page-icon" [name]='p.icon'></ion-icon>
<span class="page-name">{{p.title}}</span>
</button>
</ion-list>
from tabs.ts :
<ion-tabs>
<ion-tab [root]="tab1Root" tabTitle="" tabIcon="home"></ion-tab>
<ion-tab [root]="tab2Root" tabTitle="" tabIcon="md-flash"></ion-tab>
<ion-tab [root]="tab3Root" tabTitle="" tabIcon="md-heart"></ion-tab>
<ion-tab [root]="tab4Root" tabTitle="" tabIcon="md-person"></ion-tab>
</ion-tabs>
from tabs.ts :
export class TabsPage {
// this tells the tabs component which Pages
// should be each tab's root Page
tab1Root: any = HomePage;
tab2Root: any = WorkoutsPage;
tab3Root: any = ContactPage;
tab4Root: any = ProfilePage;
constructor() {
}
}