Ionic-framework: Configuration {tabsHideOnSubPages: "true"} doesn't work when refresh browser on subpage

Created on 7 Sep 2017  路  6Comments  路  Source: ionic-team/ionic-framework

Resources:
Before submitting an issue, please consult our troubleshooting guide (http://ionicframework.com/docs/troubleshooting/) and developer resources (http://ionicframework.com/docs/developer-resources/)

Ionic version: (check one with "x")
[ ] 1.x (For Ionic 1.x issues, please use https://github.com/ionic-team/ionic-v1)
[ ] 2.x
[x] 3.x

I'm submitting a ... (check one with "x")
[x] bug report
[ ] feature request
[ ] support request => Please do not submit support requests here, use one of these channels: https://forum.ionicframework.com/ or http://ionicworldwide.herokuapp.com/

Current behavior:

Tabs doesn't hide when I refresh browser on a subpage, despite setting {tabsHideOnSubPages: "true"}
Expected behavior:

Tabs should hide.
Steps to reproduce:

Related code:

insert any relevant code here

Other information:

Ionic info: (run ionic info from a terminal/cmd prompt and paste output below):

cli packages: ({project_root}/node_modules)

    @ionic/cli-utils  : 1.9.2
    ionic (Ionic CLI) : 3.9.2

local packages:

    @ionic/app-scripts : 2.1.4
    Ionic Framework    : ionic-angular 3.6.0

System:

    Node : v8.1.2
    npm  : 5.3.0 
    OS   : macOS Sierra

v3

Most helpful comment

The official starter "ionic-conference-app" can demonstrate it. Just need to update IonicModule.forRoot () adding {tabsHideOnSubPages: "true"} configuration.
https://github.com/ionic-team/ionic-conference-app.git

All 6 comments

Hello! Thank you for opening an issue with us! Would you be able to provide a sample application via GitHub that demonstrates the issue you are having? Thanks for using Ionic!

The official starter "ionic-conference-app" can demonstrate it. Just need to update IonicModule.forRoot () adding {tabsHideOnSubPages: "true"} configuration.
https://github.com/ionic-team/ionic-conference-app.git

When a child window is refreshed it no longer knows it is a child because the history is gone. This also causes the "back" button in the nav bar to go away.

The defaultHistory parameter should address this, but it has some issues as well. For example #10356. I am wondering if fixing the defaultHistory issue will also fix this as it will again know it is a child page. Marking this as something to look at around the same time we look into defaultHistory.

@kensodemann Hi ! I have one question. when I set config in IonicModule.forRoot

IonicModule.forRoot(MyApp, {
  backButtonIcon: 'ios-arrow-back' ,
  backButtonText: '',
  pageTransition: 'md-transition',
  activator: 'ripple',
  mode: 'md',
  tabsHideOnSubPages: true
})

then, all of the sub page will show with play md-transition and the tabs will hides, yeah it works since now. but when I need some special sub page have different act, I set config in runtime like :

import { IonicPage, NavController,Config } from 'ionic-angular';
import { LoginPage } from '../login/login';

@IonicPage()
@Component({
  selector: 'page-mine',
  templateUrl: 'mine.html',
})
constructor(
  public navCtrl: NavController,
  public config: Config
) {
  ...
}
openLogin(){
  this.config.set('pageTransition', 'ios-transition')
  this.config.set('tabsHideOnSubPages', false)
  this.navCtrl.push(LoginPage)
}

well, the pageTransition will work, but the 'tabsHideOnSubPages' doesn't work like I expected.
How can I do if I want the sub page has its own tabsHideOnSubPages ( just show tabs in sub page when I set 'tabsHideOnSubPages=true' in app config)
forgive my poor English and thank you so much !

This issue has been automatically identified as an Ionic 3 issue. We recently moved Ionic 3 to its own repository. I am moving this issue to the repository for Ionic 3. Please track this issue over there.

If I've made a mistake, and if this issue is still relevant to Ionic 4, please let the Ionic Framework team know!

Thank you for using Ionic!

Was this page helpful?
0 / 5 - 0 ratings