导航到Page / Component并在Ionic4中设置为Root

问题描述 投票:1回答:1

我正在开发Ionic4中的应用程序,我使用router-outlet进行导航。我想,当我导航到一个页面时,我应该设置为根页面。就像在Ionic3中一样,当我们想要将页面设置为root时,我们会遵循以下规则。

this.navCtrl.setRoot('PageName');

在Ionic4中,我正在这样导航

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

我如何清除Ionic4中最后导航页面的历史记录。

任何人都可以帮助我吗?

angular ionic-framework angular4-router ionic4 router-outlet
1个回答
0
投票

请参考Ionic 4 setRoot with Angular Router。据此,Ionic 4采用Angular路由,没有定义根页面。

© www.soinside.com 2019 - 2024. All rights reserved.