【发布时间】:2018-03-26 07:09:08
【问题描述】:
我已经检查了与此相关的各种其他问题,但没有得到回答,所以我正在回信。
tabs.html
<ion-tabs>
<ion-tab [root]="tab1Root" tabIcon="ios-add"></ion-tab>
<ion-tab [root]="tab2Root" tabIcon="ios-alarm"></ion-tab>
<ion-tab [root]="tab3Root" tabIcon="ios-albums"></ion-tab>
<ion-tab [root]="tab4Root" tabIcon="ios-alert"></ion-tab>
</ion-tabs>
tabs.ts
// all imports are done.
@Component({
templateUrl: 'tabs.html'
})
export class TabsPage {
tab1Root = AlarmPage;
tab2Root = AddPage;
tab3Root = AlbumsPage;
tab4Root = AlertPage;
constructor() {
}
alert-page.ts
//all imports are made
// syntaxes are done correctly
export class AlertPage {
constructor(navCtrl: NavController){}
gotToOtherPage(){
this.navCtrl.push(OtherPage);
}
}
other-page.ts
//When I navigate to other page from the above mentioned pages the tabs does not displayed on the OtherPage.
【问题讨论】:
标签: ionic-framework ionic2 ionic3