Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70924

nav.Push not working, just refresh to root

$
0
0

@Epy92 wrote:

Hello guys!

I have the following situation:

  1. I have a presentation page and a login button
  2. Clicking on Login I push the login page
  3. After login I push to user homepage and I enable the split pane (tabs) in left side of the app.
  4. 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:

Menu

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;
}

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70924

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>