Angular router 角度路由器-**通配符停止子路由

Angular router 角度路由器-**通配符停止子路由,angular-router,angular10,Angular Router,Angular10,我有一个角度应用程序,它使用多个模块,每个模块都有自己的路由。例如,在根目录中: const routes: Routes = [ { path: 'home', component: LandingPageComponent}, { path: 'cookiespolicy', component: CookiesPolicyComponent }, { path: 'privacypolicy', component: PrivacyPolicyComponent }, {

我有一个角度应用程序,它使用多个模块,每个模块都有自己的路由。例如,在根目录中:

const routes: Routes = [
  { path: 'home', component: LandingPageComponent},
  { path: 'cookiespolicy', component: CookiesPolicyComponent },
  { path: 'privacypolicy', component: PrivacyPolicyComponent },
  { path: 'termsofservice', component: TermsOfServiceComponent },
  { path: '', redirectTo: '/home', pathMatch: 'full' },
  { path: '**', component: PageNotFoundComponent }
];

@NgModule({
  imports: [RouterModule.forRoot(routes)],
  exports: [RouterModule]
})
export class AppRoutingModule { }
以及用户帐户模块:

const routes: Routes = [
  { path: 'account/login', component: LoginComponent },
  { path: 'account/register', component: RegisterComponent },
  { path: 'account/password/change', component: ChangePasswordComponent }
];

@NgModule({
  imports: [RouterModule.forChild(routes)],
  exports: [RouterModule]
})
export class AccountRoutingModule { }
现在,当我输入https:localhost:4200/account/login时,我会被重定向到PageNotFoundComponent。这几乎就像通配符停止了所有进一步的url“搜索”。如果我注释掉PageNotFoundComponent并导航到“/account/login”url,我就到达了

帐户路由模块导入account.module,account.module导入app.module

有人能给我解释一下发生了什么事吗?我觉得这是一件简单的事情,但我一直在逃避