Reputation: 320
Hi all I am new to ionic 2,How can we use multiple tabs in my app,
tabs-page
we have used two ion-tabs
but only one tab is displaying, another one tab is not visible
.multiple tabs
and multiple tabs are need to be visible
in the page... My ion-tabs
code:-
<ion-tabs>
<ion-tab tabIcon="apps" [root]="tab3Root"></ion-tab>
</ion-tabs>
<ion-tabs>
<ion-tab [root]="tab1Root" tabTitle="Tab 1" tabIcon="pulse"></ion-tab>
<ion-tab [root]="tab2Root" tabTitle="Tab 2" tabIcon="pulse"></ion-tab>
</ion-tabs>
In plunker this below ion-tab is not displaying:-
<ion-tabs>
<ion-tab tabIcon="apps" [root]="tab3Root"></ion-tab>
</ion-tabs>
Upvotes: 2
Views: 2149
Reputation: 663
It Can done by using CSS and making the visible
. Follow below code and plunker link
HTML
<ion-tabs tabs-only>
<ion-tab tabIcon="apps" [root]="tab3Root"></ion-tab>
</ion-tabs>
<ion-tabs tabs-only2 >
<ion-tab [root]="tab1Root" tabTitle="Tab 1" tabIcon="pulse"></ion-tab>
<ion-tab [root]="tab2Root" tabTitle="Tab 2" tabIcon="pulse"></ion-tab>
</ion-tabs>
CSS
ion-tabs[tabs-only] .tabbar {
position: fixed;
bottom: 0;
height: auto;
visibility: visible;
opacity: 1;
z-index: 111;
height: 85px;
}
ion-tabs[tabs-only] {
margin-bottom: 20px;
contain: none;
top: 85%;
}
Upvotes: 1