Is it possible to have router named outlets that are activated once and then never destroyed, no matter what route is navigated in primary outlet?
The intention is to have components that persist on page (for instance, sidebar) but get the benefits of routing on their initial load - such as guards (resolvers) and lazy loading.
The requirement is that named outlets shouldn't affect UX in any negative way, for example by introducing garbage suffixes to SPA URL, e.g. (outletName:routeName)
, they also shouldn't be accidentally deactivated. If there's a way to detach them from router after initial activation, it would be appropriate.
skipLocationChange
option cannot be used for this purpose. In this example /login(popup:compose)
URL appears when Contact
and Login
routes are sequentially navigated.
popup
outlet persists when primary outlets are navigated, but it pollutes URL with(popup:compose)
. – CaravansaryContact
link is clicked, url isn't changed, but(popup:compose)
appears whenLogin
is clicked. Covered here #43644280 – Caravansary