How to handle ion-menu's ion-list item click event (ionic 2)?

i found new ionic 2 side menu from docs

<ion-menu [content]="mycontent">
  <ion-content>
    <ion-list>
    ...
    </ion-list>
  </ion-content>
</ion-menu>

<ion-nav #mycontent [root]="rootPage"></ion-nav>

but there isn’t any thing for item click event and changing about root page according to item click.can any one help me here.

Hi there!

So you should check out the sidemenu starter

ionic start myApp sidemenu --v2 --ts

This will show you have to set things up.

https://github.com/driftyco/ionic2-starter-sidemenu/blob/typescript/app/app.html#L9

https://github.com/driftyco/ionic2-starter-sidemenu/blob/typescript/app/app.ts#L44

1 Like

Its working now.Thanks.

How to scroll item list in ionic 2 ,below is my code please help me.

<ion-header>

    <ion-navbar color="primary">
        <!--<ion-scroll scrollY="true">-->
        <ion-title>Main Home Page</ion-title>

        <!--</ion-scroll>-->
    </ion-navbar>

    <!--<ion-scroll>-->
    <ion-list>
        <button menuClose ion-item color="inputcolor" *ngFor="let g of gs" (click)="openPage(g)">
      Beverages  : {{ g }}
    </button>

    </ion-list>