Tabs is displayed on every page of the app ionic

I used before tabs on my previous application with ionic 2.x.
Now i upgrade for ionic 3.x and try to reuse tabs.
the tabs still on every page i go to.
I take a look at the tabs starter project and try to go to another page, the tabs still appear.
how i can solve this problem ?

the main activity:

<ion-tabs>
  <ion-tab [root]="PersonalActivity" tabTitle="Planning du jour" tabIcon="clipboard"   ></ion-tab>
  <ion-tab [root]="GeneralActivity" tabTitle="Planning global" tabIcon="md-clipboard"   ></ion-tab>
</ion-tabs>

the personal activity

  <ion-card>
       .....
  </ion-card>

the main activity

@Component({
  selector: 'page-activity',
  templateUrl: 'activity.html',
})
export class ActivityPage {

  GeneralActivity =GeneralActivityPage;
  PersonalActivity = PersonalActivityPage;
  constructor(,public navCtrl: NavController, public navParams: NavParams) {
  }

Thank you

Of course the tabs will appear, when you select one the tab change but if you want to go to another page without tabs just not use the ion-tabs component on that page.

So just make navigation to other page not a tab.

Yes i remeber now how to solve this. my bad. i have a bad memory
i solve this by using

    let nav = this.app.getRootNav();
    nav.push(SampleDetailsPage);

I am getting tired of fighting against this, and perhaps I should just give up, but I think the previous post is terrible advice. Please don’t inject app, please don’t call getRootNav(). Define clear interaction boundaries between every component of your app, and respect them.

1 Like

@rapropos I (and probably a lot of other people) have learnt a lot from your posts on this forum, so please don’t give up. :wink: I think this forum benefits a lot from experienced people like you.

you are wright but how i can solve this problem without using that ? i do not have any other choice than using
getRootNav()

Of course you do, but think about your UX first. Tabs are for separating parts of your app. Combining multiple apps into a single one is another way of thinking about it. Your user will become disoriented if they take some action and lose the tabs, which are their way of navigating through the app. The only way I think this makes sense is to use a modal, so that it is clear that we are in a temporary situation and how we get back to our normal state with the tabs usable.

1 Like

I agree app.getRootNav() not only is deprecated, but takes a lot of time to execute(approximately 800ms) on average device.

1 Like