首页 > 解决方案 > 如何使用 Ionic-4 中的路由导航同一页面?

问题描述

我想使用 Ionic 4 中的路由导航同一页面。

我已经尝试过此代码但无法正常工作this.navCtrl.navigateRoot('super');

itemClicked(event) {
this.navCtrl.navigateRoot('super');

  }

我希望页面导航到 Ionic 4 中的同一页面

标签: ionic-frameworkionic4angular7-router

解决方案


{
    path: '',
    component: MyPage
  },
  {
    path: ':id',
    component: MyPage
  }

推荐阅读