Disable swipe to view sidemenu when using tabs

后端 未结 3 1664
孤独总比滥情好
孤独总比滥情好 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.

提交回复
热议问题