When I read about Angular Router's auxiliary routing it is discussed as being an "independent" set of routes. However, what I'm trying to create "dependent" routes. For example:
/home -> HomeComponent, WelcomeComponent
/about -> AboutComponent, SearchComponent
/products -> ProductsComponent, ProductListComponent
/pricing -> PricingComponent, WelcomeComponent
I want to be able to just specify the main (page) route like the following code and based on my example above load these two components (AboutComponent, SearchComponent).
<a routerLink="/about">About</a>
I can get the two components to load when I use the following:
<a [routerLink]="[{ outlets: { primary: ['about'], sidebar: ['search'] } }]">
Products List
</a>
However, I really don't want the link to know about the auxiliary route. I want it supplied automatically. Is this possible with the right configuration? Or will this require me to extend the RouteModule to do this?
Edit:
Another requirement I have to is to keep the peer to each other. The layout of the site is such that the second component is not within the main component.