loading
Office 01
JL. RAYA SAWANGA, MAMPANG
Pancoran Mas, Depok
+628111026606
Mon - Fri 9:00am - 5:00 pm
[email protected]o.co.id
24 X 7 online support

How to hide ionic tabs on sub pages

How to hide ionic tabs on sub pages
How to hide ionic tabs on sub pages
How to hide ionic tabs on sub pages

If you have hard time to find solution for hiding tabs in Ionic framework 4/5 here is simplest solution for you.

Open your page .ts file (page that you don't want to show tabs on it)

then place this code in constructor part.

const tabs = document.querySelectorAll('ion-tab-bar');
  Object.keys(tabs).map((key) => {
    tabs[key].style.display = 'none';
});

Your final code will be like this:

constructor() {
    const tabs = document.querySelectorAll('ion-tab-bar');
    Object.keys(tabs).map((key) => {
      tabs[key].style.display = 'none';
    });
}

Screenshots of results

Be the first to leave a comment.

Post a Comment

back to top