Disable swipe to view sidemenu when using tabs

后端 未结 3 1671
孤独总比滥情好
孤独总比滥情好 2021-02-05 16:22

I\'m writing a small ionic app and have an issue. I\'m using a sidemenu and also tabs. I have an ionic slide-box in one of my views, when I wipe this slidebox from left to right

相关标签:
3条回答
  • 2021-02-05 16:47

    I'm using something like this on my app:

    .controller('AgendaCtrl', function($scope, $ionicSideMenuDelegate){
      $scope.$on('$ionicView.enter', function(){
          $ionicSideMenuDelegate.canDragContent(false);
        });
      $scope.$on('$ionicView.leave', function(){
          $ionicSideMenuDelegate.canDragContent(true);
        });
    })
    

    now, when you leave the view it's draggable again.

    0 讨论(0)
  • 2021-02-05 16:54
    <ion-side-menus>
      <ion-side-menu-content drag-content="false">
      ............
      </ion-side-menu-content>
    </ion-side-menus>
    

    this is sample code follow @Chetan Buddh's answer

    0 讨论(0)
  • 2021-02-05 17:00

    ion-side-menu-content drag-content="false" put this code in your ion-sidemenu's ion-pane tag

    0 讨论(0)
提交回复
热议问题