如何在屏幕底部放置离子标签? [英] How to place ionic tabs at the bottom of the screen?

查看:146
本文介绍了如何在屏幕底部放置离子标签?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个简单的离子选项卡,在屏幕顶部显示我的图标。我试图将它包裹在一个离子 - 页脚栏中,以便将它放在屏幕的底部,但没有成功。当我这样做时,标签会消失。我应该如何完成我想要的外观?

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>


推荐答案

由于 beta 14 离子( http://blog.ionic.io/the-final-beta/),有一些配置变量现在默认为它们的平台值,这意味着它们将尝试根据它们构建的平台来运行。
对于标签,对于iOS,默认显示在底部,Android显示在顶部。

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.

您可以轻松地硬设置位置所有平台都在你的配置函数中设置 $ ionicConfigProvider 中的 tabs.position 函数,如下所示:

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

}]);

您可以查看文档这里

这篇关于如何在屏幕底部放置离子标签?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆