I am trying to learn about using third-party Ionic2 menus and want to see if I can have a separate side menu in each child view.
I installed one of the running applications, which has an ionic menu in the main application, that is, in the bootstrap file app.htmlwe have
<ion-menu [content]="content">
<ion-toolbar>
<ion-title>Pages</ion-title>
</ion-toolbar>
<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>
<ion-nav [root]="rootPage" #content swipeBackEnabled="false"></ion-nav>
Then I added my own page, and in the initial root page of the getting-started.tssample application I will add the next page to go to a new page.
public goToSideMenuPage(): void{
this._navController.push(SideMenuPage);
I also add a button to call the handler above.
In SideMenuPage, I would like it to have a completely different side menu. I tried the following ...
<ion-menu [content]="thecontent">
<ion-toolbar>
<ion-title>Menu title</ion-title>
</ion-toolbar>
<ion-content>
<ion-list>
<button>button1</button>
<button>button2</button>
</ion-list>
</ion-content>
</ion-menu>
<ion-content #thecontent>
<div>Main contents text</div>
</ion-content>
, , , , Main contents text . , , , app.html, ""
<button>button1</button>
<button>button2</button>
doco , , , . , ( , , , ), , , , .
- , , , ?