Implement hash fragments in the router (#2320)

* implement hash fragments in the router

* clean up query and search example

---------

Co-authored-by: Jonathan Kelley <jkelleyrtp@gmail.com>
This commit is contained in:
Evan AlmloffandJonathan Kelley authored and GitHub committed 2024-04-25 14:30:25 -04:00
1 parent dd8e69635b
commit 08da9a1253
17 files changed
+550 -190

No files matched your search

+2 -1
View File
@@ -128,7 +128,8 @@ where
fn route_from_location(&self) -> R {
let location = self.window.location();
let path = location.pathname().unwrap_or_else(|_| "/".into())
+ &location.search().unwrap_or("".into());
+ &location.search().unwrap_or("".into())
+ &location.hash().unwrap_or("".into());
let path = match self.prefix {
None => path,
Some(ref prefix) => {