Description
Is your feature request related to a problem? Please describe.
Suppose you want to navigate away from a blazor app (base path: /) to an mvc / razor page hosted on the same host: /foo
I don't think you can currently do this very easily in a blazor client application, and this is problematic.
This is because all navigation performed within the blazor app is set to be relative to the base path (in this case /) and in addition, the blazor client-side router takes full ownership of all URLs under the base path, so therefore, no navigation can escape the router.
Describe the solution you'd like
A simple way to navigate away from the blazor client side app, bypassing the router.
Not fussy. Could be an optional boolean when making a Navigate call, to "bypass router"?
Perhaps this is already possible - if so please let me know the recommended mechanism.
Describe alternatives you've considered
I've considered using the Router's Fallback component (it routes to this component if it cant match any client side route) and implementing a component that uses js interop to do a browser.reload() at the given url where that component is displayed. I think this would work but it seems overly cumbersome. Also I'd like to distinguish between navigation that I explicitly do not want my SPA to handle (I.e when I know I am navigating away from the app) and a genuine client side routing mistakes where an intended client side navigation (within the app) could not be resolved for some reason. It would be beneficial to reserve the router fallback component for that second case, and have some mechanism of navigating that explicitly caters for the first case
Additional context
Note this is also a problem for architectures where you want multiple spa's hosted at different paths, and want to be able to navigate from /spa1 to /spa2 etc. All navigation from with /spa1 will have the base path /spa1 preserved and the same with /spa2. So an attempt to navigate from /spa1 to /spa2 actually just navigates to /spa1/spa2 and is handled by the client side router fallback component. In this case my idea above about using a fallback component to do a browser reload at that path wouldn't work so that's another reason I do not like it.
Also a similar problem occurs with http client - how can /spa1 blazor client app make a http request to /api? As due to the base path being set on http client requests to /api/ actually get sent to /spa1/api/. I can see a blazor app needing to make http calls to api outside if its url space as well as inside it, as needs require. Would be good to have some documentation as to golden path to achieve that.