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

networking - Vagrant-provisioned VirtualBox VM is not reachable from Ubuntu host -

c# - ASP.NET Core - There is already an object named 'AspNetRoles' in the database -

ruby on rails - ArgumentError: Missing host to link to! Please provide the :host parameter, set default_url_options[:host], or set :only_path to true -