user3398632
user3398632

Reputation: 65

Tabs are coming on different positions in android and ios

i create a project using ionic tab example. but in ios the tabs are coming in bottom but in android tabs are coming in top.how the tabs can come in bottom in both the platforms

Upvotes: 2

Views: 1821

Answers (1)

Swaminathan Vetri
Swaminathan Vetri

Reputation: 413

Ionic framework handles platform specific rendering of the layouts. This can be changed by injecting $ionicConfigProvider to the .config method in your app.js, the configurations can be changed using the methods exposed by this service. To change the tabs position, add the below line inside your app.config method $ionicConfigProvider.tabs.position('bottom'); Sample

.config(function($stateProvider, $urlRouterProvider, $ionicConfigProvider) {
$ionicConfigProvider.tabs.position('bottom');
}

I have removed other stateProvider & urlRouterProvider code from the above method for brevity

More options regarding $ionicConfigProvider is available under this link http://ionicframework.com/docs/api/provider/$ionicConfigProvider/

Note : This fix works for latest version(v1.0.0-beta.14) of Ionic only.

Upvotes: 6

Related Questions