Rudyard Charles Hartstein
Posts: 0
Joined: Fri Aug 19, 2016 3:18 pm

How can I control the slide panel visibility in Angular JS (Ionic)?

Hello Ricardo,
Could you be so kind and share the steps the you followed to block the slide menu at login page? I have tried to add ng-swipe-right attribute on the page (Using the properties page panel of builder) , but I'm not sure what i need to right to disable it.

Thanks a lot
Rudy

Ricardo Amaral
Posts: 0
Joined: Thu Mar 17, 2016 7:33 pm

How can I control the slide panel visibility in Angular JS (Ionic)?

Hi Rubyard, try this and let me know if work:

Go to the page you want to block the slide manu, at page Properties add an Attribute named: ng-swipe-right or ng-swipe-left depending on side of your menu, for that attribute type false at attribute value. a href="https://d2r1vs3d9006ap.cloudfront.net/s ... 1471623464[/img] /a

Rudyard Charles Hartstein
Posts: 0
Joined: Fri Aug 19, 2016 3:18 pm

How can I control the slide panel visibility in Angular JS (Ionic)?

Hi Ricardo,

Code: Select all

Thank you for your prompt reply. I created a new Ionic App just for testing it, and I tried to add the ng-swipe-left on the attribute, and set it as "false" on Info page but still not working. I also have tried to use ng-swipe-right without success 

Note: I changed the default route page to "Info page".

Image

Ricardo Amaral
Posts: 0
Joined: Thu Mar 17, 2016 7:33 pm

How can I control the slide panel visibility in Angular JS (Ionic)?

Hi Rubyard, now I remember I spent lot of hours to find the solution. At that time I I think I read in a forum that I should set the size of side menu to 0px on the page I want to "block" it. The problem is I forgot where to change = that. I have reviewed my app and I can ́t remember :( . So I will work to remember it later and get back to you soon :)

Rudyard Charles Hartstein
Posts: 0
Joined: Fri Aug 19, 2016 3:18 pm

How can I control the slide panel visibility in Angular JS (Ionic)?

Hi Ricardo,

Code: Select all

Thank you for your help, I really appreciate it. I found a workaround, now every time that I select the Login page from slide menu, or when I start this app, I must provide my credentials, I'm not sure if this is the right way... 

Image

Magnus8311560
Posts: 0
Joined: Sun Jun 26, 2016 11:55 pm

How can I control the slide panel visibility in Angular JS (Ionic)?

Try this:

on the login page init function, switch off side menu like so:

$ionicSideMenuDelegate = Apperyio.get("$ionicSideMenuDelegate");
$ionicSideMenuDelegate.canDragContent(false);

on the landing page you get to after login, switch it back on

$ionicSideMenuDelegate = Apperyio.get("$ionicSideMenuDelegate");
$ionicSideMenuDelegate.canDragContent(true);

Troy Koss
Posts: 0
Joined: Fri Feb 05, 2016 2:59 am

How can I control the slide panel visibility in Angular JS (Ionic)?

Hello - I'm not seeing a solution for hiding the menu side bar on select pages. I want it on most pages but on a few I want to hide and disable the menu.

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

How can I control the slide panel visibility in Angular JS (Ionic)?

Hello Troy,

Please use JS below to hide a menu (for example, right menu):
predocument.getElementsByClassName("menu-content")[0].style.transform = "translate3d(0px, 0px, 0px)";/pre

Troy Koss
Posts: 0
Joined: Fri Feb 05, 2016 2:59 am

How can I control the slide panel visibility in Angular JS (Ionic)?

The only problem is on every page i have to then turn it back on right?

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

How can I control the slide panel visibility in Angular JS (Ionic)?

No, you can run that code on the ng-click directive on each menu item, e.g. create a scope function for that and use that function

Return to “Issues”