サブページのナビゲーションバーとタブ(下にある)を非表示にしようとしています。アクセスCSSスタイルを使用してdisplay
をnone
に変更するソリューションを見つけました。Ionic 2のnav-barとタブを隠すには?
私は成功したナビゲーションバーとタブが、それはまだ空白がサブページのtableViewであり、あなたがスクリーンショットに
を見ることができるようにサブページのコンテンツは、2つの空白の間にあるという問題が隠されてこの問題を解決するにはどうすればよいですか?
これはナビゲーションバーとタブ
//get all tabs elements
if (document.querySelector('.tabbar')) {
this.tabBarElements = document.querySelectorAll('.tabbar.show-tabbar');
}
//get all toolbar elements
if (document.querySelector('.toolbar')) {
this.toolBarElements = document.querySelectorAll('.toolbar');
}
}
//hide all tabs and the header toolbar when enter page
ionViewWillEnter() {
if (this.tabBarElements) {
this.tabBarElements[0].style.display = 'none';
this.tabBarElements[1].style.display = 'none';
}
if (this.toolBarElements) {
this.toolBarElements[1].style.display = 'none';
}
}
INFO
を非表示にするには、私のコードである私は、問題の原因を見出した(一番下のスクリーンショットを参照)が、私はできませんイオン2についてCSS
[Ionic 2のタブでnav-barを隠す方法は?](https://stackoverflow.com/questions/34963381/how-to -hide-nav-bar-with-ionic-2) – aghilpro
この質問のLeRoyのコードを使用しました – Taha
問題の原因を見つけましたが、CSSで変更することはできません – Taha