[英]unable to create header and subheader using tabs concept in ionic2
i am using side menus to navigate to my tabs page. 我正在使用侧面菜单导航到我的标签页。
I am facing an issues with myheader. 我的myheader遇到问题。
How do i get according to the image given here as img1 using tabs concept in ionic2 我如何使用ionic2中的选项卡概念根据此处给出的图像img1获得图像
enter image description here 在此处输入图片说明
I used the code as 我用的代码是
<ion-content>
<ion-tabs tabsPlacement="top" primary>
<ion-tab [root]="tab1Root" tabTitle="PROFILE"></ion-tab>
<ion-tab [root]="tab2Root" tabTitle="ORDERS"></ion-tab>
<ion-tab [root]="tab3Root" tabTitle="PASSWORD"></ion-tab>
</ion-tabs>
</ion-content>
after this code i am getting the out like the below image 这段代码后,我像下面的图片一样
I can't see the entire code, but think the issue with your code is that you're not including the header in the tabs view. 我看不到完整的代码,但是认为您的代码存在问题,就是您没有在标签视图中包含标题。 Please take a look at this plunker . 请看看这个矮人 。
Like you can see there, you can achieve that design with this code in your view: 就像在那里看到的那样,您可以在视图中使用以下代码来实现该设计:
<ion-header>
<ion-navbar primary>
<ion-title>
My Account
</ion-title>
</ion-navbar>
</ion-header>
<ion-tabs #myTabs primary>
<ion-tab [root]="tab1Root" tabTitle="Profile"></ion-tab>
<ion-tab [root]="tab2Root" tabTitle="Orders"></ion-tab>
<ion-tab [root]="tab3Root" tabTitle="Password"></ion-tab>
</ion-tabs>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.