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

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

问题描述

我有一个标签布局,这是我的页面。点击我导航到下一个'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属性 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.

您需要在中包含配置对象NgModule ,在 IonicModule.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: []
})

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

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