I have a component that receives an event from a child component, like so:
<my-component (dataOutput)="route($event)"></my-component>
In my function route
I would like to route to a url that contains the URL I'm currently on, PLUS the auxiliary route which shows an overlay with some data received by the output event. I've attempted the below which doesn't work
const url = ['albums', albumId];
const outlet = { outlets: { artistEditor: ['artist', artistId] } }
this.router.navigate(url, outlet);
If I route to just { outlets: { artistEditor: ['artist', artistId] } }
, the application cannot find the route. Although, as a side note, if I wrote it in HTML it navigates correctly with a test button like so:
<a [routerLink]="[{ outlets: { artistEditor: ['artist', 'artistId'] } }]" >New</a>
What's the best way to programmatically route to an auxiliary route, ensuring the URL that I defined is also adhered to?