🩹 Corrige doc y código por cambios en Page
This commit is contained in:
parent
3ba71dbe45
commit
2a4d6a7890
4 changed files with 6 additions and 6 deletions
|
@ -59,8 +59,8 @@ impl Extension for HelloWorld {
|
|||
}
|
||||
|
||||
async fn hello_world(request: HttpRequest) -> ResultPage<Markup, ErrorPage> {
|
||||
Page::new(Some(request))
|
||||
.with_component(Html::with(move |_| html! { h1 { "Hello World!" } }))
|
||||
Page::new(request)
|
||||
.add_component(Html::with(move |_| html! { h1 { "Hello World!" } }))
|
||||
.render()
|
||||
}
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ async fn hello_name(
|
|||
path: service::web::Path<String>,
|
||||
) -> ResultPage<Markup, ErrorPage> {
|
||||
let name = path.into_inner();
|
||||
Page::new(Some(request))
|
||||
Page::new(request)
|
||||
.add_component(Html::with(move |_| html! { h1 { "Hello " (name) "!" } }))
|
||||
.render()
|
||||
}
|
||||
|
|
|
@ -9,7 +9,7 @@ impl Extension for HelloWorld {
|
|||
}
|
||||
|
||||
async fn hello_world(request: HttpRequest) -> ResultPage<Markup, ErrorPage> {
|
||||
Page::new(Some(request))
|
||||
Page::new(request)
|
||||
.add_component(Html::with(move |_| html! { h1 { "Hello World!" } }))
|
||||
.render()
|
||||
}
|
||||
|
|
|
@ -60,8 +60,8 @@ impl Extension for HelloWorld {
|
|||
}
|
||||
|
||||
async fn hello_world(request: HttpRequest) -> ResultPage<Markup, ErrorPage> {
|
||||
Page::new(Some(request))
|
||||
.with_component(Html::with(move |_| html! { h1 { "Hello World!" } }))
|
||||
Page::new(request)
|
||||
.add_component(Html::with(move |_| html! { h1 { "Hello World!" } }))
|
||||
.render()
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue