I have an albums module that's loaded by the main app-router module. When clicking the albums link in the navigation, it directs to the albums module which loads an empty path and some child routes. The reason for this is the component assigned to the empty path has it's own navigation and router outlet. This component is the AlbumContainer.
The module has some child routes too. However, when I click on albums in the main navigation, I want it to automatically route to one of the children components / routes (dates). I know it's possible to just add the child route url to the main album navigation anchor, but then that prevents the main navigations routerLinkActive from functioning.
Is it possible that when I land on this module / component, that it automatically routes to the dates path?
In all other instances (in the albums sub menu), I'll be linking directly to the child route via the sub menu.
const routes: Routes = [
{
path: '',
component: AlbumContainer,
children: [
{
path: 'dates',
loadChildren: () => import('./dates/dates.module').then((mod) => DatesModule)
},
{
path: 'artists',
loadChildren: () => import('./art/profile.module').then((mod) => mod.ArtistsModule)
},
]
},
];
HTML for reference
<div>
<!-- Sub Menu -->
<div>
<albums-menu></albums-menu>
</div>
<!-- Router Content -->
<div>
<router-outlet></router-outlet>
</div>
</div>