Angular 基本路由问题:这是我的 app.module.ts 中的 Routes 结构
const routes: Routes = [
{ path: 'ManagerDataContainer', component:ManagerDataContainerComponent,
children:
[
{ path: 'SysUsersForm', component: UsersFormComponent }
]
....
在ManagerDataContainer组件中,我有某种数据结构,我想通过这样做从锚点路由到 SysUsersForm:
<a [routerLink]= "getRouterByScreenID(screen.ScreenID)"...
应评估为:
<a routerLink= "SysUsersForm">AAAAAAA</a>
甚至
<a routerLink= "/SysUsersForm" routerLinkActive="active">AAA</a>
这是 ManagerDataContainer 的模板:
<div>
<div *ngFor="let XXX of YYYYYYY">
<!-- <a [routerLink]= "getRouterByScreenID(screen.ScreenID)"
routerLinkActive="active">AAAAA</a> -->
<!-- <a [routerLink]= "SysUsersForm" routerLinkActive="active">
AAAAAA</a> -->
<a routerLink= "SysUsersForm" routerLinkActive="active">AAAA</a>
</div>
<div class="tableViewContainer">
<router-outlet></router-outlet>
</div>
</div>
我不断收到:“错误错误:未捕获(承诺):错误:无法匹配任何路由。URL 段:'SysUsersForm'”
我究竟做错了什么 ?