app的路线是:
{path: 'profile', component: ProfilePageComponent, outlet: 'bodyOutlet'
, children: [
{path: 'profile-personal-information', component: ProfilePersonalInformationComponent, outlet: 'profileOutlet'},
{path: 'profile-license-details', component: ProfileLicenseDetailsComponent, outlet: 'profileOutlet'}
] }
所以,我可以导航到profilePageComponent:
this.router.navigate([{ outlets: { bodyOutlet: ['profile'] } }]);
但是从ProfilePageComponent导航到profileOutlet不能使用以下代码:
this.router.navigate([{ outlets: { 'bodyOutlet': [ 'profileOutlet', 'profile-personal-information']}}]);
或
this.router.navigate([{outlets: {profileOutlet: ['profile-personal-information']}}]);
所以,我需要帮助从一个命名的路由器插座导航到另一个命名的路由器插座