Reputation: 8075
I have an ionic app with 2 sidemenus, left and right:
<ion-side-menus>
<ion-side-menu-content >
<ion-nav-bar id="main_header">
</ion-nav-bar>
<ion-nav-view></ion-nav-view>
</ion-side-menu-content>
<ion-side-menu side="left" id="sidemenuleft">
<ng-include src="'templates/menuleft.html'"></ng-include>
</ion-side-menu>
<ion-side-menu side="right" id="sidemenuright">
<ng-include src="'templates/menuright.html'"></ng-include>
</ion-side-menu>
</ion-side-menus>
in my controller, I can disable drag for them:
$ionicSideMenuDelegate.canDragContent(false);
the question is: can I disable it for only one side? Example: drag to the left works, drag to the right, don't?
Upvotes: 0
Views: 167
Reputation: 8075
For the records... I could do this with the following code (inside a controller):
$scope.$on('$ionicView.beforeEnter', function() {
$ionicSideMenuDelegate._instances[0].left.setIsEnabled(true);
$ionicSideMenuDelegate._instances[0].right.setIsEnabled(false);
});
Don't know if this is a goo approach, but it's working.
Upvotes: 1