menu - Ionic 2 shared component -


i building ionic 2 project , want share header , sidemenu between pages! 1 can please ? have add side menu app.html file :

<ion-menu [content]="content">     <ion-header>         <ion-toolbar>             <ion-title>menu</ion-title>         </ion-toolbar>     </ion-header>     <ion-content>         <ion-list>             <button ion-item (click)="openpage(homepage)">         home       </button>             <button ion-item (click)="openpage(friendspage)">         friends       </button>             <button ion-item (click)="openpage(eventspage)">         events       </button>             <button ion-item (click)="closemenu()">         close menu       </button>         </ion-list>     </ion-content> </ion-menu>  <ion-nav [root]="rootpage" #content swipebackenabled="false"></ion-nav> 

in case, don't need create shared component.

this work you, in efficient way.

page.ts

   <ion-header>        <ion-navbar>          <button ion-button menutoggle>            <ion-icon name="menu"></ion-icon>          </button>          <ion-title>about</ion-title>          <ion-buttons end>            <button ion-button icon-only (click)="presentpopover($event)">              <ion-icon name="more"></ion-icon>            </button>          </ion-buttons>    </ion-navbar>  </ion-header> 

refere official demo conference app


Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -