-
Notifications
You must be signed in to change notification settings - Fork 10.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Blazor - Allow hashed routing #6175
Comments
I suppose we don't have to worry about base path with hash navigation, which is a plus. |
Any chances this will be implemented? For example: I make apps which should be opened in iframe, so there is only way to use hash navigation. Also, I suppose, hash navigation is the only option for hybrid mobile apps (cordova/capacitor). |
I would also like to have the option to configure hash navigation. I'm deploying my Blazor WebAssembly to a server I don't have any control over, so I can't configure a catch all route to the index.html. |
I'm trying to use Blazor WASM inside a Chrome extension and I can't reroute all requests to index.html. Hash routing would be helpful. |
I'm migrating an old Asp.Net Web Forms site to Blazor. It's littered with hash routings for scrolling in-page. Changing href="#install" to "thispage#install" doesn't work. Implementing hash routing before net6 would be really welcome. |
We ran into this same issue hosting a static Blazor SPA on a CDN. All status code have to redirect back to index.html. Seems strange since hashed routing is pretty standard at this point for SPAs. |
Is there a way to do this today? |
There are numerous reasons for needing the ability to use hash routing. Is there a solid reason why this isn't implemented? Honestly, kind of expected Blazor to support this out of the box. |
Hash routing would solve #18986 as well. |
We'd like to host blazor wasm apps on GitHub Pages (not at the root) and it looks like the lack of hash based routing makes that difficult. |
@rajsite I would recommend using the default routing, and only use hash routing if you can't avoid it. I guess we can't use hash routing atm anyway. |
There are some useful workarounds in there, more-so if the blazor application is the only one on the pages site at root (which is not our scenario). Even if we did have a single blazor app at root, serving the 404 as the application is not ideal (like the blog hints at). All to say lack of hash based routing makes using GitHub Pages difficult (need workarounds and undesired trade-offs). |
I think this is a necessity too. Modern browsers know about the #, other SPA frameworks use it and it gives SPA developers more capacity to avoid unnecessary round trips to the server. I also hit an issue where the documented redirection URL from Azure AD authentication breaks when a Blazor WASM only SPA is hosted from a static website (Such as Azure storage static website) |
Is there any progress on this? |
Thanks for contacting us. We're moving this issue to the |
We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process. |
This means for net9?!? |
We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process. |
What's the progress? I'm planning to deploy my website to ipfs, need to have this feature. |
Hello there.
I have just been reading this in-depth guide.
In the section Client Routing the article states:
I have recently created a Angular app that required hashed routes, as it was purely client-side, the server was a MVC controller and I did not want my client making requests to the server... only for the server to redirect to index.html... plus I found that the server had trouble deciding between component and API routes.
I think hashed routes are a very important feature, and for my previous project they where a necessity.
Hope this is added in future.
The text was updated successfully, but these errors were encountered: