How to display drawer in all page except login page


i want display drawer in all page and i get success to display it but problem is i don’t want to display on login
code that i used


<ion-menu [content]="content">
<button menuClose ion-item *ngFor="let p of pages" (click)="openPage(p)">
<ion-nav [root]="rootPage" #content swipeBackEnabled="true"></ion-nav>


export class MyApp {

@ViewChild(Nav) nav: Nav;

  rootPage: any = LoginTabPage;
  db : DatabaseHelper;

pages: Array<{title: string, component: any}>

  constructor(platform: Platform) {
    this.pages = [
      { title: 'Voucher Entry', component: VoucherentryPage },
      { title: 'Voucher Summary', component: VoucherSummaryInputPage }
    platform.ready().then(() => {
  openPage(page) {


do this in your login.ts

import { Component } from '@angular/core';

import { TaskListPage } from '../task-list/task-list';

  templateUrl: 'build/pages/login/login.html',
export class LoginPage {

  constructor(private nav: NavController, private menu: MenuController) {;

  } // end of constructor

  // on click of Login button
  doLogin() {
     // code to perform login
     // and setRoot to your specified page

     // in my case if I want to change the page to `TaskListPage` after login
     // I must use above line of code in order to `setRoot`

  onPageDidEnter() {
      // the left menu should be disabled on the login page;

  onPageDidLeave() {
      // enable the left menu when leaving the login page;


This works perfectly on ionic2 beta.10


yes it’s works…again thank you…

how i set the icon for drawer… in all page…on click that icon open drawer


Hi, do you have a sample code of the application? Thanks