implement layouts and outlets
This commit is contained in:
1 parent
f4227c7311
commit
fbd333e334
10 files changed
+910
-259
No files matched your search
@@ -59,12 +59,22 @@ fn Route6(cx: Scope, extra: Vec<String>) -> Element {
|
||||
}
|
||||
}
|
||||
|
||||
#[inline_props]
|
||||
fn Nested(cx: Scope, nested: String) -> Element {
|
||||
render! {
|
||||
div{
|
||||
"Nested: {nested:?}"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[rustfmt::skip]
|
||||
#[derive(Routable, Clone, Debug, PartialEq)]
|
||||
#[routable]
|
||||
#[derive(Clone, Debug, PartialEq)]
|
||||
enum Route {
|
||||
#[route("/(dynamic)" Route1)]
|
||||
Route1 { dynamic: String },
|
||||
#[nest("/hello_world")]
|
||||
#[nest("/(nested)" nested { nested: String } Nested)]
|
||||
#[route("/" Route2)]
|
||||
Route2 {},
|
||||
// #[redirect("/(dynamic)/hello_world")]
|
||||
|
||||
Reference in new issue
Block a user