#Show optional modal based on route without loading additional data

4 messages · Page 1 of 1 (latest)

placid mural
#

I have the following urls /overview and /overview/$singleID where the main page is a table of content and if you click on something I want to show a modal.
Right now I've solved this with an <Outlet /> and it works great. But since I can't pass data down to the Outlet I need to load data twice. I could obviously solve this using a context but this feels overkill.
What's the best way to have two routes load the same view? I could control the modal based on if $singleID is set or not. But how would I then have both /overview and /overview/$singleID load the same component?

neon pelican
placid mural
neon pelican