Angular 组件没有';别再装了

Angular 组件没有';别再装了,angular,ionic-framework,angular-ui-router,Angular,Ionic Framework,Angular Ui Router,我的一个模块中有以下路径 @NgModule({ declarations: [ DriverHomeComponent, DriverNavbarComponent, DriverProfileComponent ], imports: [ SharedModule, RouterModule.forChild([ { path: 'driver/cabinet', component: Dri

我的一个模块中有以下路径

@NgModule({
  declarations: [
    DriverHomeComponent,
    DriverNavbarComponent,
    DriverProfileComponent
  ],
  imports: [
    SharedModule,
    RouterModule.forChild([
      { 
        path: 'driver/cabinet', 
        component: DriverHomeComponent,

      },
      {
        path: 'driver/cabinet/profile',
        component: DriverProfileComponent
      }
    ])
  ],


  exports:[
    DriverNavbarComponent
  ]
})
export class DriverModule { }
当我转到
driver/cabinet driverhomememcomponent
成功加载时,我单击按钮进入
driver/cabinet/profile
,然后加载
DriverProfileComponent
。现在,我单击后退,这会再次将我带到
驱动程序/机柜
。现在,当我再次单击按钮时,它不会再次将我带到
driver/cabinet/profile
,甚至url也不会更改并保持为
driver/cabinet

为什么它不显示我第二次想访问此文件时的
DriverProfileComponent
内容?我没有http调用什么的,只有
driverprofielecomponent
中简单的纯html

<ion-menu-toggle auto-hide="false" *ngFor="let p of driverNavBarComponents">
    <ion-item [routerDirection]="p.direction" [routerLink]="[p.url]" color="primary">
      <ion-icon slot="start" [name]="p.icon"></ion-icon>
      <ion-label>
        {{p.title}}
      </ion-label>
    </ion-item>
  </ion-menu-toggle>

{{p.title}}

请发布您的
驱动程序配置组件的代码
考虑打开路线跟踪。它将路由信息打印到控制台中,以帮助您更好地调试路由问题。添加
{enableTracing:true}
作为
.forChild([…],{enableTracing:true})
的第二个参数。此外,请添加用于激活路由的代码。您正在使用路由器链接吗?或
。在代码中导航
?这个语法是什么样子的?@NikaKhurashvil,如果你的应用程序
path:'**'
。搜索它并删除以进行测试可能会有所帮助。如果路径不匹配,角度给出了一个错误,可能有助于理解什么是错误的。也许考虑为我们创建一个StabrBILITZ。