angularjs - How to disable drag side menu in ionic -


i using 2 side menu in ionic app i.e. on left , right side.

how can disable dragging right menu only. tried using $ionicsidemenudelegate.candragcontent(false) disables both side dragging.

html ref

<ion-nav-bar>  <ion-nav-buttons side="left"> <button menu-toggle="left"> </button> </ion-nav-buttons>  <ion-nav-buttons side="right"> <button menu-toggle="right"> </button> </ion-nav-buttons>  </ion-nav-bar> 

how can disable dragging right menu only.

important: following answer works in ionic2/3.

you can use swipeenable(shouldenable, menuid) method, in right menu. since have 1 menu on each side, instead of id, can use side ('left' or 'right').

import { menucontroller, ... } 'ionic-angular';  @component({     templateurl: 'app.html' }) export class myapp {    constructor(private menuctrl: menucontroller, ...) {     this.menuctrl.swipeenable(false, 'right');      // ...    }    // ...  } 

Comments

Popular posts from this blog

html - How to set bootstrap input responsive width? -

javascript - Highchart x and y axes data from json -

javascript - Get js console.log as python variable in QWebView pyqt -