Does angular2 support nested states/routes?

With the new version of the router, If you want to use nested routes,
here is an example on how to define the path

{
    path: 'search',
    component: SearchComponent,
    children: [
        { path: 'results/:id',  component: ResultsComponent },
    ]
}

and in your SearchComponent template, add <router-outlet></router-outlet>

Leave a Comment