I have a small issue using the ion-slide-box with the ion-side-menu.
It works properly except when i try changing $ionicSideMenuDelegate.canDragContent value NOR when i do a redirect on first load.
I made a codepen to show you :
As you can see, if you drag the slide from left to right the menu opens, which shouldn’t be the case.
The problem comes from two potential places.
First place, lines 106 and 109 :
Bug happens when I disable/enable the menu opening by content dragging depending on the state (using $ionicSideMenuDelegate.canDragContent()).
If i remove these lines, it works properly.
Second place, line 120 :
I listen for the stateChangeStart to reroute the user if data needs to be loaded.
In my codepen this code is meaningless but in the final app, i want to preload labels, user’s profile messages, etc… before showing anything.
So in the first stateChangeStart, i check if data need to be loaded, if that’s the case, i redirect the user to a loading state, and once data are loaded, the user is redirected back to the state asked in the first place.
Oddly, if i remove these redirections, it also works properly.
I put constants at the top so you can toggle the lines i talked above without scrolling on the code if you wish.
Just set one of them to “true” and the menu will work correctly.
I would be tempted to say it’s a bug on angular nor ionic but i absolutely don’t exclude a mistake on my side of course. Maybe my redirection system isn’t the right way to do it for example.
Something to mention is that after navigating to another page and comming back to the “Activities” page, menu works correctly.
Do you have any suggestions ?
Have a great day !