Ionic sidemenu does not re-appear after $state.go

This looks like a straight forward thing to do, but, somehow, it does not work.

All I am trying to do is,

  1. a main page with a side menu
  2. Side menu has an item that navigates to another template
  3. The template has a button to go back to the main menu state.
  4. After clicking the button, the main page comes back. But the hamburger menu icons dont re-appear.

There is a pen here:

In the pen:

  1. Open the side menu
  2. Select “Upload”
  3. Hit “Back” on the Upload screen
  4. Side menu does not appear on main screen

I tried $timeout wrap. Did not help. What am I missing ?


your custom-back handling is wrong.
why are you not using the default back-button handling?

Actually I started with ion-nav-back-button. But, the back button did not appear for this case! I changed the codepen code to use ion-nav-back-button. Please try.

because your dom structure is invalid.

In an app you have in most cases a global sidemenu. in your case you add the sidemenu only to one state… and every state is in an extra ion-nav-view with an own navbar.

I restructured everything:

Perfect. Thanks.