Tabs layout is not working. It only uses the default: icon-top.
<ion-tabs [selectedIndex]="mySelectedIndex" tabsLayout="icon-start" showWhen="ios">
Np change whatsoever.
Tabs layout is not working. It only uses the default: icon-top.
<ion-tabs [selectedIndex]="mySelectedIndex" tabsLayout="icon-start" showWhen="ios">
Np change whatsoever.
<ion-tabs class="tabs-icon-text" [color]="isAndroid ? 'tabs' : 'primary'">
<ion-tab [root]="tab1Root" tabIcon="home" tabTitle="Home" tabBadge="" tabBadgeStyle=""></ion-tab>
<ion-tab [root]="tab2Root" tabIcon="mic" tabTitle="Messages" tabBadge="" tabBadgeStyle=""></ion-tab>
<ion-tab [root]="tab3Root" tabTitle="Messages" tabIcon="analytics"></ion-tab>
</ion-tabs>
try this
It did not work. The only change is adding the class.
lemme see the source code
<ion-tabs [selectedIndex]="mySelectedIndex" class="tabs-icon-text" >
<ion-tab [root]="tab1Root" tabTitle="Home" tabIcon="home-outline" tabLayout="icon-start"></ion-tab>
<ion-tab [root]="tab2Root" tabTitle="Meetings" tabIcon="albums-outline"></ion-tab>
<ion-tab [root]="tab3Root" tabTitle="Mayors" tabIcon="person-outline"></ion-tab>
<ion-tab [root]="tab4Root" tabTitle="Policy" tabIcon="book-outline"></ion-tab>
<ion-tab [root]="tab5Root" tabTitle="Settings" tabIcon="settings-outline"></ion-tab>
</ion-tabs>
awesome>> send me a screenshot of what you are having
it should be icon -> name
rather than
icon
name
look at my tabs >> are tryna to produce something similar
no, i want the icon and the icon title to be inline.
like this
yes, that is precisely it.
`<ion-tabs class="tabs-icon-text" [color]="isAndroid ? 'tabs' : 'primary'">
<ion-tab [root]="tab1Root" tabIcon="home" tabTitle="Home" tabBadge="" tabBadgeStyle=""></ion-tab>
<ion-tab [root]="tab2Root" tabIcon="mic" tabTitle="Messages" tabBadge="" tabBadgeStyle=""></ion-tab>
<ion-tab [root]="tab3Root" tabTitle="Messages" tabIcon="analytics"></ion-tab>
</ion-tabs>`
add the above code to the tabs.html
imports: [
BrowserModule,
IonicModule.forRoot(MyApp,{
tabsLayout: 'icon-start',
})
],
set your app.module.ts with the code above
That will do the trick
I have tried this as well and it also does not work. There is something larger going on here. Would my version of Ionic 3 be an issue?
ionic info
type this into your CLI. Let me know the results you get
cli packages: (/usr/local/lib/node_modules)
@ionic/cli-utils : 1.19.0
ionic (Ionic CLI) : 3.19.0
global packages:
cordova (Cordova CLI) : 7.1.0
local packages:
@ionic/app-scripts : 1.3.7
Cordova Platforms : android 6.2.3 ios 4.4.0
Ionic Framework : ionic-angular 3.1.1
System:
ios-deploy : 1.9.0
ios-sim : 6.0.0
Node : v6.9.4
npm : 4.1.1
OS : macOS Sierra
Xcode : Xcode 9.0 Build version 9A235
Environment Variables:
ANDROID_HOME : not set
Misc:
backend : pro
Please try and upgrade your ionic apps-script you use the latest features of ionic inside your project and try again
npm install @ionic/app-scripts@latest --save-dev
This did not work either.
try this
working perfectly in ionic v3
<ion-tabs tabsLayout="icon-start">
<ion-tab tabIcon="megaphone" tabTitle="Promotion"></ion-tab>
<ion-tab tabIcon="flash" tabTitle="Sale" ></ion-tab>
</ion-tabs>
output:-