Hi!
I’m having a little problem.
When I launch for example ionic serve, everything works perfectly, but when I save something, or refresh using F5, my tabs dissapear, and the only way to see them again, its closing the ionic serve, and launch it again.
On my phone works correctly, its just the browser.
Here is my code for the tabs.
import { Component } from '@angular/core';
@Component({
templateUrl: 'tabs.html'
})
export class TabsPage {
tab1Root = "NewsPage";
tab2Root = "TeamsPage";
tab3Root = "ResultsPage";
constructor() {
}
Here my app.module.
@NgModule({
declarations: [
MyApp,
TabsPage,
],
imports: [
BrowserModule,
IonicModule.forRoot(MyApp, {
tabsHighlight: true,
tabsHideOnSubPages: true,
tabsPlacement: "top",
}),
AngularFireModule.initializeApp(firebaseConfig),
],
bootstrap: [IonicApp],
entryComponents: [
MyApp,
TabsPage,
],
providers: [
StatusBar,
SplashScreen,
{provide: ErrorHandler, useClass: IonicErrorHandler},
AngularFireDatabase,
]
})
export class AppModule {}
Here my news tab.
<ion-content padding>
<ion-card *ngFor="let item of newsRef$ | async">
<ion-card-header>
{{item.title}}
</ion-card-header>
<ion-card-content>
{{item.text}}
</ion-card-content>
</ion-card>
</ion-content>
newsRef$: FirebaseListObservable<any[]>;
constructor(public navCtrl: NavController, public navParams: NavParams, private firebaseDB: AngularFireDatabase) {
this.newsRef$ = this.firebaseDB.list('/news');
}
Thank you!!!