我不知道该怎么解释,所以我只是举例说明
[admin-layout.module具有admin-layout.routin g]
@NgModule({
RouterModule.forChild(AdminLayoutRoutes),
...
})
[admin-layout.routing具有property.component]
export const AdminLayoutRoutes: Routes = [
{ path: 'property', component: PropertyComponent, canActivate: [AuthGuard] },
...
]
[property.component.html具有]
<div class="card-body mt-3">
<app-parameters></app-parameters>
</div>
[pamaters.component.html具有]
<a [routerLink]="['/soadate']" routerLinkActive="active" >SOA DATE</a>
<router-outlet></router-outlet>
我有一个soadate.component,需要在patameters.component.html的路由器出口处看到
[此soadate.component位于paramters.module.ts内部]
@NgModule({
imports: [
CommonModule,
RouterModule.forChild(ParametersRoutes),
],
declarations: [
SoaDateComponent
]
})
这是ParametersRoutes.routing
import { Routes } from '@angular/router';
import { SoaDateComponent } from './soa-date/soa-date.component';
export const ParametersRoutes: Routes = [
{ path: 'soadate', component: SoaDateComponent}
];
请告诉我单击<a [routerLink]="['/soadate']" routerLinkActive="active" >SOA DATE</a>
后如何在 parameters.component.html 中看到 soadate.component.html 。 >
谢谢。