-
I want to get current route url, when current is view! {
<Router>
{move || {
if true {
view! { <p>"content1"</p> }.into_view()
} else {
view! { <p>"content2"</p> }.into_view()
}
}}
<main>
<Routes>
<Route path="/" view=Home/>
<Route path="/page1" view=Page1/>
<Route path="/page2" view=Page2/>
<Route path="/page3" view=Page3/>
<Route path="/page4" view=Page4/>
<Route path="/page5" view=Page5/>
</Routes>
</main>
</Router>
} Thanks, |
Beta Was this translation helpful? Give feedback.
Answered by
gbj
Jan 8, 2024
Replies: 1 comment
-
You can use use_location. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
kzhui125
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can use use_location.