There are some different places in the default styles for Android and iOS in Ionicframework, which are documented in official documents, but often can't be missed.
First, the difference:
1.tab position, $ionicConfigProvider, tabs.position (value)
Android default is top, iOS is bottom (bottom)
2. Title Android default on the left, iOS default center
Navbar.aligntitle (value)
Two: Solutions:
1. The tab default setting for Android is displayed at the bottom:
Modify the App.js file as follows:
. config (function ($stateProvider, $urlRouterProvider, $ionicConfigProvider) {//Modify The tabs of Android display position! start $ionicConfigProvider. Platform.ios.tabs.style (' standard '); $ionicConfigProvider. Platform.ios.tabs.position (' bottom '); $ionicConfigProvider. Platform.android.tabs.style (' standard '); $ionicConfigProvider. Platform.android.tabs.position (' standard '); $ionicConfigProvider. Platform.ios.navBar.alignTitle (' center '); $ionicConfigProvider. Platform.android.navBar.alignTitle (' left '); $ionicConfigProvider. Platform.ios.backButton.previousTitleText ('). Icon (' Ion-ios-arrow-thin-left '); $ionicConfigProvider. Platform.android.backButton.previousTitleText ('). Icon (' Ion-android-arrow-back '); $ionicConfigProvider. Platform.ios.views.transition (' iOS '); $ionicConfigProvider. Platform.android.views.transition (' Android '); //Modify The tabs of Android display position! end//Ionic uses Angularui Router which uses the concept of States//Learn more here:Https://github.com/angular-ui/ui-router //Set up the various states which the app can is in. //Each state ' s controller can be found in Controllers.js$stateProvider//Setup an abstract state for the tabs Directive. State ('Tab', {URL:'/tab', Abstract:true, Templateurl:'templates/tabs.html' }) //Each tab has a own NAV history stack:. State ('Tab.dash', {URL:'/dash', Views: {'Tab-dash': {templateurl:'templates/tab-dash.html', Controller:'Dashctrl'}} ). State ('Tab.chats', {URL:'/chats', Views: {'Tab-chats': {templateurl:'templates/tab-chats.html', Controller:'Chatsctrl'}} ). State ('Tab.chat-detail', {URL:'/chats/:chatid', Views: {'Tab-chats': {templateurl:'templates/chat-detail.html', Controller:'Chatdetailctrl'}} ). State ('Tab.account', {URL:'/account', Views: {'Tab-account': {templateurl:'templates/tab-account.html', Controller:'Accountctrl' } } }); //If none of the above states is matched, use this as the fallback$urlRouterProvider. Otherwise ('/tab/dash');});
2. Change the title style of Android to center display
Set the align-title= "Center" property on the command Ion-header-bar.
Ionic Default Style Android and iOS diff