Swipe left/right event with side menu?

I just implementing some swiping events in a directive, however this problem came up. Is there anyway of disable swipe menu on certain part of the app?

I think this problem came up a long time ago somewhere but I couldn’t find any solution.

Anyone have a solution?

Hey there!

You can do this



I am also looking for this functionality. Given the example above, I injected the $ionicSideMenuDelegate into the controller, then called the method but does not seem to work.

.controller('AppCtrl', ['$scope', '$ionicSideMenuDelegate', function($scope, $ionicSideMenuDelegate) {

codepen: http://codepen.io/anon/pen/gCxvz?editors=101

Any help here is appreciated, thanks!

Ahh sorry about that, jump a bit too early.

Here’s a full working demo. Note that it needs to be passed through $rootScope

Thanks for the quick reply, and I am able to get it to work as expected using attributes. According to the documentation, I thought I would be able to call these methods on the delegate from within the controller:

From sideMenuDelegate.js:

Methods called directly on the $ionicSideMenuDelegate service will control all side menus.

$ionicSideMenuDelegate.canDragContent(false); did work in beta13 but is broken now in beta14

Works for me.

One trick I did have to do was wrap it in a $timeout to catch it on the next digest cycle.

This codepen works: http://codepen.io/keithdmoore/pen/JoNGgB
but my usecase has a sidemenu with one of the pages containing tabs. One of those tabs has a page with tinder cards. This page is not honoring the call to canDragContent(false); I created an issue for it. I will try to create a codepen for my issue.

Hey @keithdmoore

It seems to work for me here.

Any way you can replicate your issue with this?

In your codepen, once the side menu is disabled, it looks like it stays disabled for the other work flows.

Welcome page slide left opens menu.
Home1 tab slide left doesnt open menu as it shouldnt.
About tab slide left does as it should.
Setting tab slide left does as it should.

Then if you go back to welcome, it is disabled.

Here is the project I am trying to do this in. The master is on beta13 and it was working. Switch to beta14 and it stopped working.


One thing that I found strange is that if I go directly to this URL: http://localhost:8100/#/app/home/card/ the side menu doesn’t display upon a slide right, which is what I want. If I restart the app and navigate to that page, it doesn’t work.

I’m using tabs, when first load the page, the page cannot be swiped but when i go to other tab i can swipe it. strange

@flameloki any chance you could check the nightly build?
We pushed an update the other day that should fix it.

  <ion-pane ion-side-menu-content drag-content="false">
       <ion-header-bar class="bar-dark">
           <h1 class="title">Cards</h1>
       <ion-content scroll="true">

This is work for me