A
A
altdja2017-04-17 10:21:54
Angular
altdja, 2017-04-17 10:21:54

How to make infinitely nested child routes in Angular 2?

Hello!
Please tell me how to implement infinitely nested routes in Angular 2 so that the route would look like this: "/api/categories/1/3/7...etc"
Is it even possible to do this? Prompt in what direction to dig?
Thanks in advance!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
ozknemoy, 2017-04-22
@ozknemoy

something like this

{
        path: 'profile', component: ProfileView, canActivate: [AuthGuard],
        children: [
            {path: 'suppliers', component: ProfileSuppliersView},
            {path: 'main', component: ProfileMainView},
            {path: 'bonus', component: ProfileBonusView,
                children: [
                    {path: 'main', component: BonusMainView},
                    {path: 'refs', component: BonusRefsView},
                    {path: 'earning', component: BonusEarningView}
                ]
            },
            {path: 'account', component: ProfileAccountView},
            {path: 'pref', component: ProfilePrefView}
        ]
    },

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question