Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to place ionic tabs at the bottom of the screen?

Tags:

tabs

ionic

I created a simple ionic-tabs that shows my icons at the top of the screen. I tried to wrap it in a ionic-footer-bar in order to have it placed at the bottom of the screen with no success. The tabs disappear when I do that. How should I accomplish the looks I want?

<ion-footer-bar>     <ion-tabs class="tabs-icon-only tabs-stable">     ...     </ion-tabs> </ion-footer-bar> 
like image 280
Italo Maia Avatar asked Jan 10 '15 09:01

Italo Maia


People also ask

How do you add a bottom tab in Ionic?

Adding Tabs Bar in Ionic Application The tab navigation is created by adding the ion-tabs having ion-tab-bar inside it which creates a tab bar on position defined in the slot property. Each tab button is created using the ion-tab-button with tab property which is the path of tab page resulting navigation.

How do you change tabs in Ionic?

All tabs can be changed by setting the value of tabsLayout on the <ion-tabs> element, or in your app's config. For example, this is useful if you want to show tabs with a title only on Android, but show icons and a title for iOS.

How do you use Ionic ion tabs?

Each ion-tab-button will activate one of the tabs when pressed. In order to link the ion-tab-button to the ion-tab container, a matching tab property should be set on each component. The ion-tab-button and ion-tab above are linked by the common tab property.


1 Answers

Since the beta 14 of Ionic (http://blog.ionic.io/the-final-beta/), there are some config variables that now default to their platform values, which means that they will try to behave according to the platform that they are built on. In the case of tabs, for iOS the default is to display on bottom, and Android on top.

You can easily "hard set" the location for all platforms by setting the tabs.position function in the $ionicConfigProvider, inside your config function like this:

MyApp.config(['$ionicConfigProvider', function($ionicConfigProvider) {      $ionicConfigProvider.tabs.position('bottom'); // other values: top  }]); 

You can check documentation here

like image 67
jrl53 Avatar answered Oct 12 '22 15:10

jrl53