Hi,
I’m building an app for tablets and i need to have the side menu always open.
I managed to open it every time with this.menuCtrl.open(); since there is no expose-aside-when in ionic 2
But when i click anywhere on the page the menu closes.
I have had good success doing this with CSS but am trying this out in case it becomes de facto.
I get the error ‘split panel needs two valid roots’
Using the sidemenu template, I have tried to set Page2 as the second root but it is not working.
Do you have a quick example of how to do this?
I have tried:
<ion-split-panel when="sm">
<ion-menu [content]="content">
<ion-nav [root]="root2"></ion-nav>
<ion-header>
<ion-toolbar>
<ion-title>Menu</ion-title>
</ion-toolbar>
</ion-header>
<ion-content>
<ion-list>
<button menuClose ion-item *ngFor="let p of pages" (click)="openPage(p)">
{{p.title}}
</button>
</ion-list>
</ion-content>
</ion-menu>
<!-- Disable swipe-to-go-back because it's poor UX to combine STGB with side menus -->
<ion-nav [root]="rootPage" #content swipeBackEnabled="false"></ion-nav>
Can anyone explain how to make panel 1 trigger a navigation in panel 2? I tried using ViewChilds in my app.component to grab both child navs and store them in a service. But that seems real shady, and there doesn’t seem to be a good way to wait until the page is loaded to store them.