Ionic2 标签导航2
我已经搜索了很多,以找到解决方案,但没有运气 我需要重定向到不同的页面时,点击标签 我的代码: 在app.html中Ionic2 标签导航2,ionic2,Ionic2,我已经搜索了很多,以找到解决方案,但没有运气 我需要重定向到不同的页面时,点击标签 我的代码: 在app.html中 <ion-footer> <ion-toolbar> <ion-tabs> <ion-tab tabIcon="md-home" [root]="rootPage" tabTitle="Home"></ion-tab> <ion-tab tabIcon="md-person" [
<ion-footer>
<ion-toolbar>
<ion-tabs>
<ion-tab tabIcon="md-home" [root]="rootPage" tabTitle="Home"></ion-tab>
<ion-tab tabIcon="md-person" [root]="profilePage" tabTitle="Profile"></ion-tab>
<ion-tab tabIcon="md-notifications" [root]="updatePage" tabTitle="Updates"></ion-tab>
</ion-tabs>
</ion-toolbar>
</ion-footer>
当我点击主页时,它调用主页构造函数,但并没有重定向到主页。
假设我在购物车页面上,点击主页选项卡。这是调用主页构造函数,但页面保持不变
请帮帮我。我不在IONIC2中您可以尝试将页面添加到app.modules.ts
entryComponents: [
MyApp,
HomePage,
rootPage,profilePage,updatePage
],
并尝试将离子选项卡作为根元素或离子内容内部移动
<ion-content padding>
<ion-tabs tabbarPlacement="top">
<ion-tab tabIcon="md-home" [root]="rootPage" tabTitle="Home"></ion-tab>
<ion-tab tabIcon="md-person" [root]="profilePage" tabTitle="Profile"></ion-tab>
<ion-tab tabIcon="md-notifications" [root]="updatePage" tabTitle="Updates"></ion-tab>
</ion-tabs>
</ion-content>
如果要将控件置于底部,请更改为tabbarPlacement属性。您可以尝试将页面添加到app.modules.ts
entryComponents: [
MyApp,
HomePage,
rootPage,profilePage,updatePage
],
并尝试将离子选项卡作为根元素或离子内容内部移动
<ion-content padding>
<ion-tabs tabbarPlacement="top">
<ion-tab tabIcon="md-home" [root]="rootPage" tabTitle="Home"></ion-tab>
<ion-tab tabIcon="md-person" [root]="profilePage" tabTitle="Profile"></ion-tab>
<ion-tab tabIcon="md-notifications" [root]="updatePage" tabTitle="Updates"></ion-tab>
</ion-tabs>
</ion-content>
如果要将控件放置在底部,请更改为tabbarPlacement属性