Disable sidemenu animation for login page

I have an application with sidemenu, based on sidemenu template. In addition the standard screen navigated from menu, I have a login page which is not part of the menu.
I defined this login in app.js:


once login is successful I redirect to one of the other screens.

Of course I don’t want that before login users will be able to go to other screens. I was able to hide navigation button by simply commenting ion-nav-buttons, however I can still slide on login page to the right and then I see the sidemenu.
I noticed that ion-pane element created for login page still has “menu-animated”, while the root element of login page itself - ion-view is added lower in elements hierarchy.

My question is how can I disable animation only for this specific page.

1 Like

Use drag-content=“false” to restrict the dragging of side menu.

As I understand this property should be added to ion-pane which is defined in menu.html, adding it indeed disable the slide but it does so for all screens.
Is there a way to set it to false statically only for a specific page or do I need to set it dynamically for each page ?

Define variable say ‘$rootScope.slideSideMenu = false’ in your controller. Set it to true once the login is successfull. Bind this variable to the property of drag-content=“slideSideMenu”.

This solution works perfect ! Thanks.

Glad it helped. welcome.

I have a similar problem because on tablets I use the force menu open option. However, on the login page, and a few others I want the menu to go away completely. Anyway of doing this?