How can I use the URL to open a modal?
Is there a way to change the URL without trigger a new page load? I am trying achieve deep linking within a given component where the UIs will change according to the URL.
2 Replies
absent-sapphire•3y ago
I've used query params before to be able to show/close a modal. Works well and doesn't cause page load. Essentially just check for the existence of the query param, if there, show the modal, if not don't.
helpful-purple•3y ago
You could also make a child route that just renders a modal when matched and make sure the parent renders <Outlet />