I have a standard sidenav layout along the lines of this
<mat-sidenav-container>
<mat-toolbar></mat-toolbar>
<router-outlet></router-outlet>
<mat-sidenav></mat-sidenav>
<mat-sidenav position="end"></mat-sidenav>
</mat-sidenav-container>
I want to use that second sidenav as a content area.
On this project, all of the active routes are simply Components with a Canvas Region and some basic information about the "Experiment". Perhaps some basic form sliders or controls.
<div>
Some Content
<div>
<canvas>
</canvas>
Basically I want the content div to go in the second sidenav container. Only the Canvas is a child of the actual component visually.
<mat-sidenav-container>
<mat-toolbar></mat-toolbar>
<router-outlet>
<canvas-component>
<canvas></canvas>
</canvas-component>
</router-outlet>
<mat-sidenav></mat-sidenav>
<mat-sidenav position="end">
<div>
Some Content
<div>
</mat-sidenav>
</mat-sidenav-container>
This seems crazy, i don't think a child should be reaching out this way and depending on a parents structure. I get that. The inverse, of having the Component add a sidenav would be much better but the sidenav has to belong to a sidenav container and so this is still outside the boundaries of the component.
So what is the best strategy instead? I can't seem to get my head around it. Would you see this as 2 components , requiring 2 outer outlets and needing a shared service so they can talk to each other? Is there a better way?