Hi all, I create demo project from ionic 2 conference app GitHub - ionic-team/ionic-conference-app: A conference app built with Ionic to demonstrate Ionic
How to show tabs bar on all pages? In my code it only working on pages which is defined in tabs.
When I add new Page to side menu, and then i click, tabs menu not visible.
If I Click to About2, About3 which is not in tab menu then tabs menu is not visible. I use tabs menu for quick accces to specific pages. So I need have tabs visible for all sites.
All tutorial and blogs use the same page in side menu and tabs menu. I dont find tutorial where is used diffrent side menu with more side menu items like in tabs.
app.component.ts
> export class ConferenceApp {
> @ViewChild(Nav) nav: Nav;
>
> appPages: PageInterface[] = [
> { title: 'Schedule', name: 'TabsPage', component: TabsPage, tabComponent: SchedulePage, index: 0, icon: 'calendar' },
> { title: 'Speakers', name: 'TabsPage', component: TabsPage, tabComponent: SpeakerListPage, index: 1, icon: 'contacts' },
> { title: 'Map', name: 'TabsPage', component: TabsPage, tabComponent: MapPage, index: 2, icon: 'map' },
> { title: 'About', name: 'TabsPage', component: TabsPage, tabComponent: AboutPage, index: 3, icon: 'information-circle' }
> { title: 'About2', name: 'TabsPage', component: TabsPage, tabComponent: AboutPage2, index: 4, icon: 'information-circle' }
> { title: 'About3', name: 'TabsPage', component: TabsPage, tabComponent: AboutPage3, index: 5, icon: 'information-circle' }
> ];
I try modify function, but this work only for side menu and tabs menu is show only on init of root page. When i use original openPage method, this use index and if is in side menu more items, index overflow
openPage(page: PageInterface) {
this.nav.setRoot(page.tabComponent);
}
tabs.ts
export class TabsPage {
// set the root pages for each tab
tab1Root: any = SchedulePage;
tab2Root: any = SpeakerListPage;
tab3Root: any = MapPage;
mySelectedIndex: number;
constructor(navParams: NavParams) {
this.mySelectedIndex = navParams.data.tabIndex || 0;
}
}
I try to use tabsHideOnSubPages to set true/false, but not success
The similar problem is defined there, but no solution.
How to show tabs on all pages in my code it only working on selected pages which i add in tabs.ts
ionic2 - Ionic 3 - Enable Tabs on different page - Stack Overflow