如何获得路由器的儿童物品?如何获取路线的子女
const appRoutes: Routes = [
{
path: 'parameters',
component: AsideComponent,
children: [
{ path: '', component: ParametersComponent },
{ path: 'crypto-accounts', component: ParametersCryptoAccountsComponent },
{ path: 'withdrawal-accounts', component: ParametersWithdrawalAccountsComponent },
{ path: 'add-withdrawal-account', component: ParametersAddWithdrawalAccountComponent }
]
},
...
]
和组件
export class AsideComponent implements OnInit {
constructor(private router: Router) {
let children = this.router... ? // <-----
}
}
我有this.router,我怎么能得到当前状态的儿童?
对于你需要什么样的目的访问这些孩子? –
我需要为它制作旁边的菜单,相同的链接 –
你需要什么信息? –