This creates problems with passive hosting (e.g. as gitlab/github pages) because the url does not exist and you will get an 404 error when trying to open it directly.
You have to modify server configuration to make it work (RewriteEngine on). Even in this case, it complicates accessing relative resources because document.baseURI has changed and you will have to hardcode the application uri. It pollutes also the namespace and hides invalid URLs.
Describe the solution you'd like
It would be nice when routing is implemented as html anchors. E.g. the example above would go to http://localhost/app/#home
Is your feature request related to a problem? Please describe.
atm, laptos_router works only with the url path. E.g. when http://localhost/app/ serves
a click on "Home" will go to http://localhost/app/home.
This creates problems with passive hosting (e.g. as gitlab/github pages) because the url does not exist and you will get an 404 error when trying to open it directly.
You have to modify server configuration to make it work (
RewriteEngine on
). Even in this case, it complicates accessing relative resources becausedocument.baseURI
has changed and you will have to hardcode the application uri. It pollutes also the namespace and hides invalid URLs.Describe the solution you'd like
It would be nice when routing is implemented as html anchors. E.g. the example above would go to http://localhost/app/#home
Implementing it manually as
does not work (laptos-router 0.5.4).
Additional context
see e.g. https://router.vuejs.org/guide/essentials/history-mode.html