1. 程式人生 > >ionic之將android導航欄安放到底部

ionic之將android導航欄安放到底部

我是程式碼

 .config(function ($stateProvider, $urlRouterProvider,$ionicConfigProvider) {

    $ionicConfigProvider.platform.ios.tabs.style('standard');
    $ionicConfigProvider.platform.ios.tabs.position('bottom');
    $ionicConfigProvider.platform.android.tabs.style('standard');
    $ionicConfigProvider
.platform.android.tabs.position('bottom'); $ionicConfigProvider.platform.ios.navBar.alignTitle('center'); $ionicConfigProvider.platform.android.navBar.alignTitle('center'); // //$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'); // 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 be 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 its own nav history stack: .state('tab.list', { url: '/list', cache: false, views: { 'tab-list': { templateUrl: 'templates/tab-list.html', controller: 'ListCtrl' } } }) .state('tab.cardList', { url: '/cardList', cache: false, views: { 'tab-cardList': { templateUrl: 'templates/tab-cardList.html', controller: 'CardListCtrl' } } }) .state('tab.create', { url: '/list/create', cache: false, views: { 'tab-list': { templateUrl: 'templates/create.html', controller: 'CreateCtrl' } } }) // if none of the above states are matched, use this as the fallback $urlRouterProvider.otherwise('/tab/cardList'); })

因為我自定義了返回按鈕,所以有兩段話我遮蔽掉了。仔細看變數的名字,很好理解的。