title: Ionic 2 - How to get back the root nav page of selected tab while switching tabs
body: <p>I have used ion-tabs in my ionic app. Here I can not get the root page which I set for the tabs at the first click.</p>
  
  <p><strong>My code changes are,</strong></p>
  
  <pre><code>&lt;ion-tabs [selectedIndex]="mySelectedIndex" color="footerbar" class="bottomenu"&gt;
      &lt;ion-tab tabIcon="ios-home" [root]="home"&gt;&lt;/ion-tab&gt;
      &lt;ion-tab tabIcon="ios-albums" (ionSelect)="showOrHideTabs()" 
          [root]="store"&gt;&lt;/ion-tab&gt;
      &lt;ion-tab tabIcon="ios-person" [root]="user"&gt;&lt;/ion-tab&gt;
      &lt;ion-tab tabIcon="ios-settings" [root]="settings"&gt;&lt;/ion-tab&gt;
  &lt;/ion-tabs&gt;
  </code></pre>
  
  <p>And the components is,</p>
  
  <pre><code>constructor(public navCtrl: NavController, public navParams: NavParams, public app: App) {
          this.mySelectedIndex = navParams.data.tabIndex || 0;
          this.home = 'HomePage';
          this.store = 'StoreTabsPage';
          this.user = 'MyInfoViewPage';
          this.settings = 'SettingsPage';
      }
  </code></pre>
  
  <p>I have following pages   </p>
  
  <ol>
  <li>Home Page
  
  <ul>
  <li>Program create page</li>
  </ul></li>
  <li>Store Info page</li>
  <li>My info page</li>
  <li>Settings page</li>
  </ol>
  
  <p>Say, I am going to navigate the page to program create (sub page) from home page (ion-tab)
  then I am switching the tab to store info page (ion-tab).
  At this time, If I come back to home page means, The program create page alone shown and the home page is not shown.</p>