File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -348,10 +348,15 @@ define the "tab" content as child routes.
348348const routes = [
349349 {
350350 path: ' /some/route' ,
351+ // We don't provide a name on this parent route, but rather
352+ // set the name on the default child route instead
353+ // name: 'some-route',
351354 component: SomeRouteComponent,
352355 // Child route "tabs"
353356 children: [
354- { path: ' ' , component: DefaultTabComponent },
357+ // Note we provide the above parent route name on the default child tab
358+ // route to ensure this tab is rendered by default when using named routes
359+ { path: ' ' , component: DefaultTabComponent, name: ' some-route' },
355360 { path: ' foo' , component: FooTabComponent },
356361 { path: ' bar' , component: BarTabComponent }
357362 ]
You can’t perform that action at this time.
0 commit comments