How to disable the side menu for a specific page?

Hi guys! I am creating an ionic version 1 application and I have used side menu template for it. There is a login page in my application. In that login page when I drag from left to right the side menu is displaying which is not required at a login page! How can I disable that side menu for a specific page like ‘login’? Waiting for a quick response from you guys! Thank you! :slight_smile:

Screen shots are added here!

import menucontroller and inject it and the this.menu.swipeEnable(false);

1 Like

I think I didn’t get what you are saying. Can you explain it further more please! Thank you :slight_smile:

@shivani8710 Can you help me with this? Thank you :slight_smile:

do this in app.component.ts
import { MenuController } from ‘ionic-angular’;

in constructor
constructor(public menu: MenuController) {

  this.menu.swipeEnable(false);

}

1 Like

Where can I find the app.component.js. Is it the same file app.js which is in the www directory?

https://drive.google.com/open?id=0B1dxmRkJJRQDYjF1dlduVVRWOVk

Here is the link to controller.js

It’s in ionic2 and i don’t have experience of ionic1

Hey @xpress,
Simply what you can do is in your login controller just add :
$scope.$on('$ionicView.afterEnter', function(event) { $ionicSideMenuDelegate.canDragContent(false); })
Thanks

2 Likes

Hey @MdShuaib It’s working!!! Thank you very much friend!! :smiley: