首页 > 解决方案 > URL SegmentError:无法匹配 ionic4 中的任何路由

问题描述

当我单击按钮转到其他页面时出现此错误。我正在使用 Ionic 4。

无法匹配任何路由。URL 段:'menu/tabs/tabs/tab-home/registered/outpatient-settings/PPSettingsPath'

我发现了许多带有此错误的主题,但没有找到解决方案。我不确定为什么会有“门诊设置/”

在我的 HTML

<div class="pandora-box" routerLink="PPSettingsPath" [queryParams]="{PsPrnNumber: patientDetails?.prn }">

在我的 ts 文件中。

this.router.events.subscribe((event: RouterEvent) => {
  if (event && event instanceof NavigationEnd && event.url) {
     this.PPSettingsPath = event.url + '/pp-settings';
  }

我希望有人能在这方面帮助我。

标签: ionic4

解决方案


推荐阅读