Ionic-framework: Impossible to hide navbar on Tab Page

Created on 22 Feb 2016  路  20Comments  路  Source: ionic-team/ionic-framework

Short description of the problem:

For the Tab Page, when avoiding <ion-navbar> tag on page template,the <ion-navbar-section> component is still generated and the black header is visible.

What behavior are you expecting?

Avoiding <ion-navbar *navbar> tag should not generate Navbar component.

Steps to reproduce:

  1. Start the Ionic2 Tabs app ionic start TabsTest tabs --v2
  2. Edit /project/root/app/pages/page1/page1.html and remove
<ion-navbar *navbar>
  <ion-title>Tab 1</ion-title>
</ion-navbar>
  1. Start the app with ionic serve and note the black header
    Screenshot here: https://www.evernote.com/l/AlqDypkUy5pEyJ9qUNrsM7bk-ZXJxGHtgsU

Ionic Version: 2.x

Browser & Operating System: Chrome

Run ionic info from terminal/cmd prompt:

Your system information:

Cordova CLI: 5.4.1
Gulp version:  CLI version 3.9.0
Gulp local:
Ionic Version: 2.0.0-beta.1
Ionic CLI Version: 2.0.0-beta.17
Ionic App Lib Version: 2.0.0-beta.8
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Mac OS X El Capitan
Node Version: v5.3.0
Xcode version: Xcode 7.2.1 Build version 7C1002

Most helpful comment

All 20 comments

ion-navbar-section {
display: none;
}

will be a workaround

@davyzhang , CSS is a not worthy workaround as it will apply the style globally and all pages will be affected. While what we want is to customise a certain pages only.

@Yagger are you still experiencing this issue with beta.3?

@jgw96 yes i do

This is definitely an issue. My workaround at the moment is:

ion-tabs ion-navbar-section { display: none; }

This is actually a challenge, because how will the app react when it transitions between pages with a navbar, and ones without?

@adamdbradley NavPop

Was this page helpful?
0 / 5 - 0 ratings

Related issues

MrBokeh picture MrBokeh  路  3Comments

vswarte picture vswarte  路  3Comments

brandyscarney picture brandyscarney  路  3Comments

brandyscarney picture brandyscarney  路  3Comments

alan-agius4 picture alan-agius4  路  3Comments