Hello guys!
I have the following situation:
- I have a presentation page and a login button
- Clicking on Login I push the login page
- After login I push to user homepage and I enable the split pane (tabs) in left side of the app.
- When I click on item in the left menu I want to load a page but the only thing that happens is that the application is refreshed and the root page is loaded (user homepage).
I tried with nav.Push / set Root and popToRoot but nothing changes.
Beneath is the code.
app.html:
app.component.ts:
@ViewChild(Nav) nav: Nav;
rootPage: any = IndexPage;
constructor(public platform: Platform, public menu: MenuController, public statusBar: StatusBar, public splashScreen: SplashScreen,
private userService: UserServiceProvider, public events: Events) {
this.initializeApp();
// set our app’s pages
this.pages = [
{ title:‘Dashboard’, component:UserHomepagePage, icon:‘assets/icon/icons8-dashboard-filled-50.png’ },
{ title: ‘Detalii restaurant’, component: RestaurantDetailsPage, icon: “assets/icon/icons8-restaurant-building-filled-50.png” }
];
}
openPage(page) {
this.nav.push(page.component);
//this.rootPage = page.component;
}