Я делю свое приложение на несколько функциональных модулей, я использую только розетку маршрутизатора внутри компонента внутри функционального модуля. ) как я могу предотвратить это?
app.component. html
<app-navbar></app-navbar>
<main>
<router-outlet></router-outlet>
</main>
<app-footer></app-footer>
Patient-List.component. html (внутри функционального модуля)
<router-outlet></router-outlet>
app-routing. module.ts
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { HomeComponent } from './components/home/home.component';
import { ContactComponent } from './components/contact/contact.component';
import { DepartmentComponent } from './components/department/department.component';
import { AboutComponent } from './components/about/about.component';
import { LoginComponent } from './components/login/login.component';
import { ErrorComponent } from './components/error/error.component';
const routes: Routes = [
{ path: '', component: HomeComponent , pathMatch: 'full' },
{ path: 'home', component: HomeComponent, pathMatch: 'full' },
{ path: 'contact', component: ContactComponent , pathMatch: 'full' },
{ path: 'department', component: DepartmentComponent, pathMatch: 'full' },
{ path: 'about', component: AboutComponent, pathMatch: 'full' },
{ path: 'login', component: LoginComponent, pathMatch: 'full' },
{
path: "patientDashboard",
loadChildren: () =>
import("./features/patient/patient.module").then(m => m.PatientModule)
},
{ path: '**', component: ErrorComponent },
];
@NgModule({
imports: [RouterModule.forRoot(routes)],
exports: [RouterModule]
})
export class AppRoutingModule { }
Patient-Rouing.module.ts
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { PatientListComponent } from './patient-list/patient-list.component';
const routes: Routes = [
{
path: "",
component: PatientListComponent, pathMatch: 'full',
}
];
@NgModule({
imports: [RouterModule.forChild(routes)],
exports: [RouterModule]
})
export class PatientRoutingModule {