Disable swipe to view sidemenu when using tabs

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 the side menu slides out. I’ve read through various related topics on the ionic forum but none have worked.

I’ve tried adding drag-content=“false” to various tags and also added $ionicSideMenuDelegate.canDragContent(false); to my controller.

Neither worked. I think it’s because I’m using a sidemenu, with tabs and views in the tabs. Heres my code:


<!-- Header bar -->
<ion-side-menu-content ng-controller="NavCtrl" drag-content="false">
    <ion-nav-bar class="bar-positive">
        <ion-nav-back-button class="button-icon ion-ios7-arrow-back">

    <!-- Page content -->
    <ion-nav-view drag-content="false" animation="slide-left-right"></ion-nav-view>

<!-- Side menu -->
<ion-side-menu side="left" class="side-menu">
    <ion-header-bar class="bar bar-header bar-dark">
        <h1 class="title">Menu</h1>
    <ion-content has-header="true">

        <div ng-if="authData.twitter" class="logged-in-user item item-avatar">
            <img ng-src="{{authData.twitter.cachedUserProfile.profile_image_url}}"/>
            <h2>Hello, {{authData.twitter.displayName}}</h2>
            <p>Logged in via Twitter</p>

        <div ng-if="authData.facebook" class="logged-in-user item item-avatar">
            <img ng-src="{{authData.facebook.cachedUserProfile.picture.data.url}}"/>
            <h2>Hello, {{authData.facebook.displayName}}</h2>
            <p>Logged in via Facebook</p>

        <ul class="list">
                <a class="item item-icon-left" menu-close nav-clear href="#/venue">
                    <i class="icon ion-ios7-location"></i>Venue
                <a class="item item-icon-left" menu-close nav-clear href="#/lunch">
                    <i class="icon ion-pizza"></i>Lunch
                <a class="item item-icon-left" menu-close nav-clear href="#/wifi">
                    <i class="icon ion-wifi"></i>Wifi
    <ion-footer-bar class="bar bar-dark">
        <button class="button button-icon icon ion-log-out menu-close nav-clear" ng-controller="LoginCtrl" ng-click="logout()"> Logout</button>

and my view:

    <ion-view title="Agenda">
<ion-content drag-content="false">
    <ion-slide-box on-slide-changed="slideHasChanged($index)">
            <div class="header-card header-card--image">
                <div class="overlay">
                    <div class="item item-text-wrap">
                        <h3 class="header-card__heading">Happening now</h3>
                        <img ng-src="img/me.jpeg" class="header-card__avatar"/>
                        <h2 class="header-card__heading">some guy</h2>
                        <p class="header-card__text">Some title</p>
            <div class="header-card header-card--image">
                <div class="overlay">
                    <div class="item item-text-wrap">
                        <h3 class="header-card__heading">Coming Next</h3>
                        <img ng-src="img/me.jpeg" class="header-card__avatar"/>
                        <h2 class="header-card__heading">Some guy</h2>
                        <p class="header-card__text">Slowly taking over the world</p>
        <ion-item ng-repeat="(id,agendaItem) in agendaItems" type="item-text-wrap" href="#/tab/agendaItem/{{agendaItem.$id}}" class="item item-avatar item-with-grid">
            <img ng-src="{{agendaItem.image}}">
            <p>{{agendaItem.startTime}} <i ng-if="agendaItem.hasNotificationSet == true" class="icon-left ion-ios7-bell"></i></p>
            <ion-option-button ng-class="agendaItem.hasNotificationSet ? 'button-balanced icon ion-ios7-bell' : 'button-positive icon ion-ios7-bell-outline'" ng-controller="NotificationCtrl" ng-click="add(agendaItem)"></ion-option-button>

            <!--<ion-option-button ng-click="getNotificationIds()"></ion-option-button>-->

and my controller:

.controller('AgendaCtrl', function($scope, AgendaFactory, $ionicSideMenuDelegate, $rootScope, $ionicPopup, $timeout, $cordovaLocalNotification, NotificationFactory) {

    $ionicSideMenuDelegate.canDragContent(false); // doesn't seem to work

    var agendaItems = AgendaFactory.getAgenda();

    // Loop through agenda itens and check which have notifications set
    agendaItems.$loaded().then(function(array) {
        angular.forEach(array, function(value, key) {

        if (NotificationFactory.isNotificationScheduled(value.notificationId) == true) {
            value.hasNotificationSet = true;
        } else {
            value.hasNotificationSet = false;


    $scope.getNotificationIds = function () {
        $cordovaLocalNotification.getScheduledIds().then(function (scheduledIds) {

        $scope.agendaItems = agendaItems;

    $scope.firstTimeLogin = $rootScope.firstTimeLogin;


Can anyone help or is ionic just not capable of doing this?

Thanks in advance

+1: I have two side menus (left and right) and a content area with . One of the tabs has a copy of ionic-ion-tinder-cards in it, and no matter how I try to disable swipe/drag to view any of the side menus, it doesn’t work. I have worked from the approach to disable all swiping (in all views), but I haven’t had any luck so far.

I just updated Ionic to v1.0.0-rc.1 (from beta.14), which seems to have fixed the problem (tested on iOS and Android). Might that be the problem in your case as well @JimboJ ?

Yes it has! Although all my icons are now broken! But I should be able to sort that :slight_smile: thanks!