My AppComponent contains a sidenav and a router-outlet. Each menu item allows me to navigate to a different feature. Each feature module has four main components:
- component 1: list => url /feature/list
- component 2: details => url /feature/details/123
- component 3: edit => url /feature/edit/123
- component 4: add => url /feature/add
When I click a feature from the sidenav I'm presented with the features' list-component by default.
On each features' list-component I'm using navigation buttons to navigate to the corresponding details, edit and add components via URL like this: this.router.navigateByUrl('/feature/details/123')
.
One of my features has a mat-tab-group
in its 'details component'. When I navigate to this component (e.g. /feature/details/123
) I would also like to be able to click on some tab and see a list-component. But to be clear, I want this component visible within the tab, not in the primary outlet.
This list should show a table with some data from id:123. Also this embeded list-component should have different buttons to allow me to navigate to its corresponding details, edit and add components.
I've tried to implement auxiliary routes, and named router-outlets, but I must be doing something wrong because I just can't get this to work. I may not understand the innerworkings properly.
Could someone please explain how I should tackle this? If it is even possible at all?