Navigate to a Page/Component and set as Root that in Ionic4

1.5k Views Asked by At

I am developing an application in Ionic4, I am using router-outlet for navigation. I want, when I navigate to a page, I should setup as root Page. Like in Ionic3, when we want to set page as root we do following.

this.navCtrl.setRoot('PageName');

In Ionic4, I am navigating like this

this.router.navigate(['/path']);

also how I can clear the history of last navigated pages in Ionic4.

any one can help me ?

1

There are 1 best solutions below

0
On

Kindly refer to Ionic 4 setRoot with Angular Router. As per this, Ionic 4 with Angular routing, there is no root page to be defined.