Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 71531

Child side-menu works on WP and MD but not on iOS

$
0
0

@bandito wrote:

Exactly what title says. The side-menu works on Android and Windows version of the app but not on iOS version.

@App({
  template: `
  <ion-menu [content]="content" #myMenu>
      <ion-toolbar primary>
        <ion-title>
        Settings
        </ion-title>
      </ion-toolbar>
      <ion-content>
        <ion-list>
          <button *ngFor="#menuPage of menuPages" ion-item (click)="openPage(menuPage.page)">
            {{menuPage.name}}
          </button>
          <button ion-item menuClose>
            Close
          </button>
        </ion-list>
      </ion-content>
    </ion-menu>

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

export class MyApp {
  constructor(_platform: Platform, _app: IonicApp) {
    _platform.ready().then(() => {
      // Okay, so the platform is ready and our plugins are available.
      // Here you can do any higher level native things you might need.
      // StatusBar.styleDefault();
      this.menu.enable(false);
    });
    this.app = _app;
  }

  menuPages: any[] = [
    { name: 'Store', page: StoreName },
    { name: 'Discounts', page: Discounts },
    { name: 'Taxes', page: Taxes },
    { name: 'Currency', page: Currency }
  ];

  rootPage: any = Login;
  app: IonicApp;
  @ViewChild(Nav) nav;
  @ViewChild('myMenu') menu: Menu;

  openPage(page): void {
    this.nav.push(page);
    this.menu.close();
  }
}

Posts: 2

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 71531

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>