Angular 2 Child Routes not Navigating

时间:2017-06-18 18:58:58

标签: angular angular-router

我有一个路由配置,简化并在下面复制。我的问题是,每当我尝试导航到/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'
            }]
        }]
    }],
}];

0 个答案:

没有答案