我有一个路线配置,在下面进行了简化和复制。我的问题是,每当我尝试导航到 时/teams/something/settings/users/invite
,我都会立即重定向到/teams/something/settings/users/list
. 我很想得到一些帮助来弄清楚我的导航出了什么问题。
守卫都按预期工作。
const settingsRoutes: Routes = [{
path: 'teams/:id/settings',
component: BaseComponent,
children: [{
component: TeamSettingsComponent,
path: '',
children: [{
path: 'users',
children: [{
path: 'invite',
component: InviteUsersComponent,
canDeactivate: [InviteUsersUnsavedChangesGuard]
}, {
path: 'list',
component: UsersComponent,
canDeactivate: [UsersUnsavedChangesGuard]
},
{
path: '',
pathMatch: 'full',
redirectTo: 'list'
}]
}]
}],
}];