Это то, что у меня есть сейчас, и я действительно не могу найти правильный ответ на мой вопрос, который я искал повсюду, так что, может быть, кто-то, кто знает, может мне помочь ?.Как мне установить RootPage как в ionic 3 в Ionic 4, потому что я попробовал все, и это то, что осталось при попытке
import {Component, ViewChild} from '@angular/core';
import {NavController, Platform} from '@ionic/angular';
import {SplashScreen} from '@ionic-native/splash-screen/ngx';
import {StatusBar} from '@ionic-native/status-bar/ngx';
import {Router} from '@angular/router';
import {GettingStartedPage} from './getting-started/getting-started.page';
@Component({
selector: 'app-root',
templateUrl: 'app.component.html',
})
export class AppComponent {
@ViewChild(NavController) nav: NavController;
rootPage;
constructor(
private platform: Platform,
private splashScreen: SplashScreen,
private statusBar: StatusBar,
private NavCtrl: NavController) {
this.initializeApp();
}
// Eindigt constructor
initializeApp() {
this.platform.ready().then(() => {
this.splashScreen.hide();
// set status bar naar onze app kleur
this.statusBar.backgroundColorByHexString('#E84B56');
});
}
openPage(page) {
// Reset the content nav to have just this page
// we wouldn't want the back button to show in this scenario
this.rootPage.navigateRoot('/getting-started');
}
}