Hi. I would like to build navigation based on repetitive layout and tabs. By that I mean that I would like to have unified layout for my tabs that are easily replaceable.
I've build something but it does not work as expected. So my goal is to have each tab child on a separate route with route configuration like this or similar:
{
path: 'machines',
component: TabsLayoutComponent,
data: {
title: 'Machines', // title in H1 element
inNavigation: true, // should it be visible in main navigation
navTitle: "Machines", // title in the main menu
tabs: [
{
label: 'Spaceships', // Tab label title
path: 'spaceships', // Tab path
component: StarshipTableComponent // Tab content
},
{
label: 'Vehicles', // ...as above
path: 'vehicles',
component: VehicleComponent
}
]
}
}
I could do something like this with TabsLayoutComponent, but I've got issues with changing paths. Here is the stackblitz for the above exmaple:
https://stackblitz.com/edit/angular-v14-playground-asqqcc