我在这条路线上有儿童和兄弟姐妹级别

时间:2018-07-25 13:07:23

标签: angularjs

我的问题是,当我导航到CategoryComponent时,它会找到显示所有内容的信息,并且还会显示CategoryCardComponent,这没问题,但是,当它到达SimonComponent时,它将显示healthComponent。

{
        path: 'category', component: CategoryComponent,
        children: [
            {
                path: '',
                component: CategoryCardComponent
            },
            {
                path: ':id',
                component: CategorylistComponent,

工作到这个水平,但是从这里开始出现问题,当我向上更改健康状况时,它开始显示在健康状况上

        children: [
            {
                path: '',
                component: SimonComponent,
            },
            {
                path: '',
                component: HealthComponent,
            },

有关当我输入simon / simon-details或health / health-details时的详细信息!那么,在健康组件和simon组件之间我哪里出错了?

                {
                    path: ':id',
                    component: HealthDetailsComponent,
                },
                {
                    path: ':id',
                    component: SimonDetailsComponent,
                }
            ]
        },
        {
            path: '',
            outlet: 'sidemenu',
            component: SideMenuComponent
        },
        { // This will enable the side menu to react to the URL of CategorylistComponent content
            path: ':id',
            outlet: 'sidemenu',
            component: SideMenuComponent
        }

    ]
},

0 个答案:

没有答案