Tabs gone after reload page


#1

After create tabs page, but every page reload (livereload) the Tabs missing (same, on root tabs or subspage).

app.component.ts

import { Component } from '@angular/core';
import { Platform } from 'ionic-angular';
import { StatusBar } from '@ionic-native/status-bar';
import { SplashScreen } from '@ionic-native/splash-screen';

import { TabsPage } from '../pages/tabs/tabs';

@Component({
  templateUrl: 'app.html'
})
export class MyApp {
  rootPage:any = TabsPage;

  constructor(platform: Platform, statusBar: StatusBar, splashScreen: SplashScreen) {
    platform.ready().then(() => {
      // Okay, so the platform is ready and our plugins are available.
      // Here you can do any higher level native things you might need.
      statusBar.styleDefault();
      splashScreen.hide();
    });
  }
}

tabs.ts

import { Component } from '@angular/core';
import { IonicPage, NavController } from 'ionic-angular';

@IonicPage()
@Component({
  selector: 'page-tabs',
  templateUrl: 'tabs.html'
})
export class TabsPage {

  tabsHomeRoot = 'TabsHomePage'
  tabsFavoriteRoot = 'TabsFavoritePage'
  tabsAddRoot = 'TabsAddPage'
  tabsSearchRoot = 'TabsSearchPage'
  tabsAccountRoot = 'TabsAccountPage'


  constructor(public navCtrl: NavController) {}

}

What i missing?


#2

tabs.page.html, for example:

<ion-tabs #tabs selectedIndex="2" (ionChange)="onIonChanged($event)">
  <ion-tab [root]="tab0Root" tabUrlPath="activity-tab" tabIcon="fa-fal-list"></ion-tab>
  <ion-tab [root]="tab1Root" tabUrlPath="location-tab" tabIcon="fa-fal-map-marker"></ion-tab>
  <ion-tab [root]="tab2Root" tabUrlPath="search-tab" tabIcon="fa-fal-street-view"></ion-tab>
  <ion-tab [root]="tab3Root" tabUrlPath="person-tab" tabIcon="fa-fal-user"></ion-tab>
  <ion-tab [root]="tab4Root" tabUrlPath="notifications-tab" tabIcon="fa-fal-bell"></ion-tab>
</ion-tabs>

#3

Here my tabs.html

<ion-tabs #tabs selectedIndex="0">
    <ion-tab [root]="tabsHomeRoot" tabUrlPath="tabs-home" tabTitle="Tabs home" tabIcon="home"></ion-tab>
    <ion-tab [root]="tabsFavoriteRoot" tabUrlPath="tabs-favorite" tabTitle="Tabs favorite" tabIcon="information-circle"></ion-tab>
    <ion-tab [root]="tabsAddRoot" tabUrlPath="tabs-add" tabTitle="Tabs add" tabIcon="information-circle"></ion-tab>
    <ion-tab [root]="tabsSearchRoot" tabUrlPath="tabs-search" tabTitle="Tabs search" tabIcon="information-circle"></ion-tab>
    <ion-tab [root]="tabsAccountRoot" tabUrlPath="tabs-account" tabTitle="Tabs account" tabIcon="information-circle"></ion-tab>
</ion-tabs>


#4

I have the same issue. After a change and live reload tabs are gone. I have to restart with ionic serve