Side menu ionic


#1

I am new at Ionic 2 and made a simple App. I built a side menu which works but sub-menu and logo’s menu don’t appear.


#2

Please be more specific. Can you post screenshots or something? And it will be nice if we can see your code.

And please, check this @Gajotres post about how to ask here :slight_smile:


#3

you can take a look at code below. Side menu’s logo and sub menu works on browser but they dont appear when I try on ios/android ionic emulate.

<ion-menu id="right" [content]="content" side="right">
  <ion-header>
    <ion-toolbar color="secondary">
      <ion-title>My journey</ion-title>
      <button id="side-menu-icon" end ion-button menuToggle="right"></button>
    </ion-toolbar>
  </ion-header>

  <ion-content class="menu-content">
    <ion-list>
      <ul menuClose ion-item *ngFor="let menuItem of sideMenuItems">
        <a (click)="openPage(menuItem.id)">{{menuItem.content.header}}</a>
          <ion-list>
            <ul (click)="openPage(subItem.id)" *ngFor="let subItem of menuItem.children">{{subItem.content.header}}</ul>
        </ion-list>
      </ul>
    </ion-list>
  </ion-content>
</ion-menu>
<ion-nav [root]="rootPage" #content swipeBackEnabled="false">></ion-nav>

#4

Your code seems fine. But you have a typo in the last line.

<ion-nav [root]="rootPage" #content swipeBackEnabled="false">**>**</ion-nav>

Use Chrome Developer Tools (Chrome > chrome://inspect#devices > Inspect > Console) and post whatever it returns when you try to open the side-menu.


#5

there are no errors on the console. The console is completely clean.