How can I have a ons-splitter only appearing after the login page?
I have a splitter menu and four more pages, all of them need to open this splitter. But before all of it, I have a login page that I want to prevent the splitter to open (swipeable)
There are 2 common ways through which you can do this:
Using ons-navigator
- you can have a navigator with the login page and then load a page with a splitter.
After that you can just use mySplitterContent.load('oneOf4Pages.html')
.
Always use mySplitterContent.load('somePage.html')
, but by default use something like <ons-splitter-side side="left" collapse>
.
Later when the user logs in you can do:
mySplitterContent.open();
mySplitterContent.setAttribute('swipeable', 'swipeable');
// and then continue using
mySplitterContent.load('somePage.html');