[ionic4-beta17]pop all pages except Root


how to pop all pages except Root in ionic 4 ?


try this!


not exist popToRoot() in NavController in ionic 4 beta 17


Hnm, weird, in this Docs have a popToRoot, sorry for that!


Please refer to the error message in console :

Property ‘popToRoot’ does not exist on type ‘NavController’



maybe there is something different wrong, because documentations says it exists.
Best regards, anna-liebt


Can you post your code? Probably your import have a error…


sorry for my late reply,
component class code in following :

import { NavController } from '@ionic/angular';
constructor(private navCtrl: NavController){
    private goToHome(){
        this.navCtrl.popToRoot().then(() => {

use <ion-router-outlet main></ion-router-outlet> in app.component.html


not any solution for this problem ?


yes and sorry NavController has no popToRoot in v4.
Maybe you can implement ion-nav which doc says that it has popToRoot.

Best regards,



Can someone publish a solution for this?