title: Cannot open menu in ionic2
body: <p>I'm new to ionic2 and TypeScript.</p>
  
  <p>My question is how to open menu in ionic2?</p>
  
  <p>The following code does not work when I press menu icon in page1.
  And I tried <code>app.getComponent('leftMenu').enable(true);</code> in page1.ts but when I run the app, the page becomes blank screen.</p>
  
  <p>Does anyone give me any suggestion or hint?</p>
  
  <p>page1.html</p>
  
  <pre><code>&lt;ion-navbar *navbar&gt;
    &lt;button menuToggle="leftMenu"&gt;
      &lt;ion-icon name='menu'&gt;&lt;/ion-icon&gt;
    &lt;/button&gt;
    &lt;ion-title&gt;Page 1&lt;/ion-title&gt;
  &lt;/ion-navbar&gt;
  
  &lt;ion-content padding class="page1"&gt;
    &lt;h2&gt;Welcome to Ionic!&lt;/h2&gt;
  &lt;/ion-content&gt;
  </code></pre>
  
  <p>page1.ts</p>
  
  <pre><code>import {IonicApp, Page} from 'ionic-angular';
  
  
  @Page({
    templateUrl: 'build/pages/page1/page1.html',
  })
  export class Page1 {
    constructor(app: IonicApp) {
      //app.getComponent('leftMenu').enable(true); &lt;- screen becomes blank.
    }
  }
  </code></pre>
  
  <p>app.ts</p>
  
  <pre><code>import {App, IonicApp, Platform, MenuController} from 'ionic-angular';
  import {StatusBar} from 'ionic-native';
  import {Page1} from './pages/page1/page1';
  import {Page2} from './pages/page2/page2';
  
  
  @App({
    template: `
      &lt;ion-menu [content]="content" id="leftMenu" side="left"&gt;
        &lt;ion-toolbar&gt;
          &lt;ion-title&gt;Pages&lt;/ion-title&gt;
        &lt;/ion-toolbar&gt;
        &lt;ion-content&gt;
          &lt;ion-list&gt;
            &lt;button ion-item (click)="openPage(page1)"&gt;
              Page1
            &lt;/button&gt;
            &lt;button ion-item (click)="openPage(page2)"&gt;
              Page2
            &lt;/button&gt;
          &lt;/ion-list&gt;
        &lt;/ion-content&gt;
      &lt;/ion-menu&gt;
      &lt;ion-nav [root]="rootPage"&gt;&lt;/ion-nav&gt;`,
    config: {} // http://ionicframework.com/docs/v2/api/config/Config/
  })
  export class MyApp {
    rootPage: any = Page1;
    page1: any = Page1;
    page2: any = Page2;
    constructor(
      platform: Platform, 
      private menu: MenuController,
      private app: IonicApp
    ) {
      this.menu = menu;
      platform.ready().then(() =&gt; {
        // 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();
      });
    }
  
    openPage(page) {
      // Reset the nav controller to have just this page
      // we wouldn't want the back button to show in this scenario
      this.rootPage = page;
  
      // close the menu when clicking a link from the menu
      this.menu.close();
    }
  }
  </code></pre>