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

Ionic 4 side menu not showing on back navigation from another menu

$
0
0

@ammar97s wrote:

Hi, Ionic developers. I have two side menus in my app. The first menu1 is for normal user who don’t need to login. And the other menu2 is for the admin. on menu1 there is an option for admin to login in and navigate to menu2. Which is working perfect. But the problem is that when the admin wants to navigate back to menu1, it does not show any side menu. But when I refresh it works fine. what can be the problem?

app.component.ts leading towards menu1 i.e startmenu
initializeApp() {
this.platform.ready().then(() => {
this.statusBar.styleDefault();
this.splashScreen.hide();
this.router.navigate([‘startmenu/maindashboard’]);
});
}
}
on that start menu I have a login button for admin
loginUser() {
this.initializeApp();
}
initializeApp() {
this.platform.ready().then(() => {
this.statusBar.styleDefault();
this.splashScreen.hide();
this.authenticationService.authState.subscribe(state => {
if (state) {
this.router.navigate([‘menu/projects’]);
} else {
this.router.navigate([‘login’]);
}
});
});
Now from Projects page I want to navigate on maindashboard by clicking back button of browser.

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70434

Trending Articles



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