Hi guys,
I’ve been studying both example apps, the conference app and the Ionic 2 tutorial app (which by the way, doesn’t appear to exist at the moment, I just tried to build the tutorial template again in the command line using ‘ionic start MyIonic2Project tutorial --v2’ but it said ✗ Error: No starter template named “tutorial”. Luckily I had a build I had already done that I could use).
I’ve been trying to combine both approaches so that I have a side menu and tabs like I’ve done in Ionic 1. I’ve had some progress by adding this code to the bottom of the hello-ionic.html page but I’m struggling with the routing and adding extra pages that should be called on tap of one of these tab items:
<ion-tabs>
<ion-tab [root]="tab1Root" tab-title="Home" tab-icon="home"></ion-tab>
<ion-tab [root]="tab2Root" tab-title="UI/UX" tab-icon="home"></ion-tab>
<ion-tab [root]="tab3Root" tab-title="Multimedia" tab-icon="home"></ion-tab>
<ion-tab [root]="tab4Root" tab-title="Contact" tab-icon="contact"></ion-tab>
</ion-tabs>
In the conference app I can see that the routing has been done in tabs.js:
export class TabsPage {
constructor(nav: NavController) {
// set the root pages for each tab
this.tab1Root = SchedulePage;
this.tab2Root = SpeakerListPage;
this.tab3Root = MapPage;
this.tab4Root = AboutPage;
}
}
What would be the best approach here, modifying the sidemenu example to also include tabs?
Thanks in advance for your help