How to set a root page on ionic 4

So what i want is to set a rootPage and not something that is directing me to that page but whenever i start the app it goes to the root page no forwarding. I can’t seem to find it anywhere so could someone maybe help me out?

In your app.component.ts

export class MyApp {
rootPage:any = “yourpage”;

change it to your page, and import it to your app.component.ts

Did not work for me

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';

    selector: 'app-root',
    templateUrl: 'app.component.html'
export class AppComponent {

    rootPage:any = '/getting-started';

        private platform: Platform,
        private splashScreen: SplashScreen,
        private statusBar: StatusBar) {

    // Eindigt constructor

    initializeApp() {
        this.platform.ready().then(() => {
            // set status bar naar onze app kleur


change it to your class name example

rootPage:any = 'GettingStartedPage';
1 Like