Ion-nav-buttons (for side-menu) disappears until page refresh


#1

I have a side menu, and I want the nav icon to always be present in my view.
Currently it’s there on my first page but as soon as I navigate to another page via the side-menu it disappears, then requiring a page refresh to actually show. Same behavior in regular Chrome, Ripple, and on iPhone (except on device I can’t refresh to ever get it to show). The view changes are working properly, the only issue is that the navigation button disappears after a view change until I refresh the page.
I can make it work with a back button but that’s not the behavior I want.

How can I get the ion-nav-buttons button to always be present?

          <ion-nav-buttons side="primary">
            <button class="button button-icon ion-navicon" menu-toggle="left">
            </button>
          </ion-nav-buttons>
  
      </ion-nav-bar>
      <ion-nav-view name="menuContent"></ion-nav-view>
    </ion-side-menu-content>
  
    <ion-side-menu side="left">
      <ion-header-bar class="bar-stable">
        <h1 class="title">Lunch!</h1>
      </ion-header-bar>
      <ion-content ng-controller="menuController">
        <ion-list>
          <ion-item nav-clear menu-close ng-click="navHome()">
            Home
          </ion-item>
          <ion-item nav-clear menu-close ng-click="navBrowse()">
            Browse
          </ion-item>
          <ion-item nav-clear menu-close ng-click="navCreate()">
            Create
          </ion-item>
          <ion-item nav-clear menu-close ng-click="navSettings()">
            Settings
          </ion-item>
        </ion-list>
      </ion-content>
    </ion-side-menu>
  </ion-side-menus>

#2

**updated, issue Resolved! Incase anyone else runs into this problem or similar:

I was using $state.go(‘state.name’) for the page changes, simply wrapping that in a $timeout fixed it. Strange that a $state.go doesn’t automatically throw a digest at the end no?


#3

it seems theres a cleaner solution, good luck

ion-side-menus enable-menu-with-back-views=“true”>


#4

The answer of @rsoares should definitely be marked as the correct solution. Tnx mate!


#5

hello sir, i have same issue but not with side menus. my issue is with the nav bar. i have enabled back navigation buttons in my header but it works for only one time. once i go back to the previous page and come back again, the nav bar disappears. any solution?


#6

I don’t think so. I had the similar issue, when I set the enable-menu-with-back-views to true, the nav button would go disappeared. In iOS device this missing nav button could lead to unable to use the app.


#7

The right solution is here: [solved] Hide <ion-nav-buttons> with ng-hide/ng-show


#8

yaa but where to use it.