These are chat archives for angular/angular-2-ionic-2

7th
Apr 2016
amaginomad
@tmlaughlinjr
Apr 07 2016 06:12
Has anyone been able to get NFC working in Ionic2 yet?
Miguel Couto
@Mig1st4ck
Apr 07 2016 09:06
hi
i am stating to play with ionic 2
how can i move ion-menu to a custom component
so that my app.ts don't have the full menu
?
currently i have this
import {MainMenu} from './menu/main/main';
@App({
  template: `
    <main-menu [content]="content"></main-menu>

    <ion-nav id="nav" #content [root]="rootPage"></ion-nav>`,
    directives: [MainMenu]
})
and in main.ts
import {Component} from 'angular2/core';

/**
 * MainMenu
 */
@Component({
    selector: 'main-menu',
    template: `
    <ion-menu [content]="content">
      <ion-toolbar>
        <ion-title>Pages</ion-title>
      </ion-toolbar>
      <ion-content>
        <ion-list>
          <button ion-item (click)="openPage(loginPage)">
            Login
          </button>
          <button ion-item (click)="openPage(signupPage)">
            Signup
          </button>
        </ion-list>
      </ion-content>
    </ion-menu>
    `
})
export class MainMenu {
    constructor() {

    }
}
but the content here is not the same as the one passed to the custom menu
how do i link it???