I am trying to implement a sidebar that opens up on various button clicks throughout the application ("more info" type of functionality). For that reason I am looking to place the sidebar component outside the router outlet.
app-component:
<nav>
<router-outlet>
<sidebar>
When the sidebar is open, I would like to grey out the rest of the screen and have a click anywhere (besides the sidebar close the sidebar). The way I thought to do it is wrap the nav and router-outlet in a div with a click event to close the sidebar. Sidebar open/close/toggle is managed with a service. The issue I'm having is wrapping the router-outlet (and nav) like that overrides the actual button clicks inside the routes meant to open the sidebar. Any advice? Many thanks