Getting Tabs header in home page, after coming out from Tabs page

In my project I have navigation like below
Home Page -->Recharge Page --> Tabs Page -->Recharge Page -->Home Page
The problem is, I’m getting Tabs Header in Home Page after coming from Tabs Page -->Recharge Page -->Home Page.
https://drive.google.com/open?id=1NpBmi2VpSW46Em4sH_f0ItcSCnlca3fG

You can find the sample project in above link. So that you can understand the problem very well.
Please follow below steps to know the bug

  1. Open the project in VS Code and run npm install in integrated terminal window.
  2. Run ionic serve
  3. Click on Recharge/Payments
  4. Select the options in Operator and State selectbox.
  5. Click on ViewPlans
  6. Click on the plan Talktime:1
  7. Click on GOBACK. Now you will be navigated to home page. You can now observe the difference between actual home page and the home page came after clicking on plan of ViewPlans.

You can find the difference below. Can any one help me with solution/answer…
HomePage
HomePage

HomePage_AfterComingOutFromTabsPage
HomePage_AfterComingOutFromTabsPage

that’s a mess, your whole project is a mess… I have checked it quickly, you should be able to do it by using an event and you have a route problem, good luck

Answer for my problem is in above link.

Instead of using this.navCtrl.setRoot(PagePage);, use this.appCtrl.getRootNav().setRoot(PagePage);

import { App } from 'ionic-angular';
export class RechargePage{
constructor(public appCtrl: App) {}

GoBack(){
this.appCtrl.getRootNav().setRoot(PagePage);
}
}

Thanks for all those who helped to solve…

1 Like