我無法在側面菜單中單擊時打開頁面。頁面無法在側面菜單中單擊時打開 - ionic 2 app
這是我app.component.ts:
this.pages = [
{ title: 'NFC Page', component: NfcPage, note: 'NFC Page' },
{ title: 'Student Details', component: StudentDetails, note: 'Student Details' },
];
這是我app.module.ts:
@NgModule({
declarations: [
StudentDetails,
NfcPage,
],
entryComponents: [
StudentDetails,
NfcPage,
],
這是我的nfc.ts頁:
import {Component} from '@angular/core';
import {IonicPage, NavController, NavParams} from 'ionic-angular';
import {NFC, Ndef} from '@ionic-native/nfc';
@IonicPage()
@Component({
selector: 'page-nfc',
templateUrl: 'nfc.html',
})
export class NfcPage {
constructor(public navCtrl: NavController,
public navParams: NavParams,
private nfc: NFC,
private ndef: Ndef) {
}
}
這是我的nfc.html頁面:
<ion-header>
<ion-navbar>
<button ion-button menuToggle>
<ion-icon name="menu"></ion-icon>
</button>
<ion-title>NFCPage</ion-title>
</ion-navbar>
</ion-header>
<ion-content padding>
<p>NFC Page!</p>
</ion-content>
學生詳細信息頁面打開正常,但是當我點擊「Nfc頁面」時,沒有任何反應。