0
votes

I have created an Ionic app with side menu. There is one page 'test.html' on which I can come in 2 ways i.e. from side menu as well as on button click. Button is on page 'test2.html'.

When I'm coming from side menu to test.html, its working fine. But when I'm coming to on button click, Back button is showing instead of side menu icon.

I always want to show side menu here.

Please see below image:

enter image description here

SideMenu.html

 <ion-side-menus enable-menu-with-back-views="false" class="menu-page">
      <ion-side-menu-content>
    <ion-nav-bar class="bar-stable">
      <ion-nav-back-button>
     </ion-nav-back-button>
     <ion-nav-buttons side="left" >
        <button class="button button-icon button-clear 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" class="left-nav">

   <ion-content scroll="false"  has-bouncing="false">
    <div class="user-info text-center">

   </div>
     <ion-list>
          <a class="item item-icon-left" menu-close ui-sref="app.menuscreen" ui-sref-active="selected">
             <i class="ion-home"></i><span>Home</span>
         </a>
      </ion-list>
   </ion-content>
  </ion-side-menu>
</ion-side-menus>
1
use this.navCtrl.setRoot(MYPAGE) instead of this.navCtrl.push(MYPAGE)user1752532
Where i need to add this? I'm working on ionic1Anjana
Sorry i thought you were using ionic 2user1752532

1 Answers

1
votes

instead of ui-sref use ng-click function and

$scope.function($scope, $state, $ionicHistory)
$ionicHistory.nextViewOptions({
   disableBack: true
});
$state.go("your page path");
})