Turn off the slide in a specific direction of the corner ion frame

I am new to angularjs and am creating an app for the first time in angularjs using an ionic structure. I created an ionic application using the following command:

$ ionic start myApp sidemenu

The application was created correctly if the left menu is saved under the sliding one, therefore the main view of the slides is on the right of the pressed menu button. Sliding works when the main view is dragged using gestures or the mouse pointer.

I want to disable drag and drop to the right to open the side menu. The side menu should only be opened by pressing the menu button and can be closed using the menu key or scrolling in the left direction or by dragging the mouse in the left direction.

+4
source share
3 answers

You can simply use this:

<ion-side-menu-content drag-content="false">

</ion-side-menu-content>
+2
source

If you are using 10+ beta , you can do this using:

<ion-side-menu-content drag-content="false">
    <!-- ... -->
</ion-side-menu-content>

You can check beta release notes > Bug fixes:

sideMenu: when drag-content = false enable drag-to-close ( e3db0856 , close # 1419 )

Before the Beta10 version, you can use it, but you cannot close the menu by scrolling it, just using the menu button.

0
source

ionic.bundle.js ionic.bundle.js, .

sideMenuCtrl.canDragContent();

-1

Source: https://habr.com/ru/post/1538554/


All Articles