重定向到下一页时如何避免页脚上的制表符 [英] How to avoid Tabs on footer when redirecting to next page

查看:42
本文介绍了重定向到下一页时如何避免页脚上的制表符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个选项卡布局,这是我的 页面.单击我正在导航到下一个this.navCtrl.push(NextPage);"的任何项目.

i have a Tabs layout here is my page. On click on any of the item i am navgating to next 'this.navCtrl.push(NextPage);`.

但问题出在我的第二页上,我也让标签看看这个 .导航完成后,我不再需要第二页中的标签.

But the problem is on my second page also i am getting the tabs take a look at this . after navigation done i no longer need the tabs in my second page.

如何避免第二页中的标签页脚.

how to avoid the tabs footer in the second page.

推荐答案

从 Ionic 2.0.0-rc.1 开始,您可以使用 config 属性在应用的 config 对象中设置进入子页面时隐藏选项卡tabsHideOnSubPages.您可以在这里找到更多信息.

As of Ionic 2.0.0-rc.1, you can set to hide the tabs when entering a child page in the app's config object by using the config property tabsHideOnSubPages. You can find more information here.

tabsHideOnSubPages(布尔值):是否隐藏子页面的标签或不.如果为 true,则不会在子页面上显示选项卡.

tabsHideOnSubPages (boolean): Whether to hide the tabs on child pages or not. If true it will not show the tabs on child pages.

您需要将配置对象包含在 NgModuleIonicModule.forRoot(...) 方法中,如下所示:

You need to include the config object in the NgModule, inside the IonicModule.forRoot(...) method like this:

import { IonicApp, IonicModule } from 'ionic-angular';

@NgModule({
  declarations: [ MyApp ],
  imports: [
    IonicModule.forRoot(MyApp, {
      // Configs for your app
      tabsHideOnSubPages: true
      // ...
    }, {}
  )],
  bootstrap: [IonicApp],
  entryComponents: [ MyApp ],
  providers: []
})

这篇关于重定向到下一页时如何避免页脚上的制表符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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