🚚 Renombra with_component
por add_component
This commit is contained in:
parent
19c16d962f
commit
0e4f10237d
5 changed files with 46 additions and 16 deletions
|
@ -14,7 +14,7 @@ async fn hello_name(
|
|||
) -> ResultPage<Markup, ErrorPage> {
|
||||
let name = path.into_inner();
|
||||
Page::new(Some(request))
|
||||
.with_component(Html::with(move |_| html! { h1 { "Hello " (name) "!" } }))
|
||||
.add_component(Html::with(move |_| html! { h1 { "Hello " (name) "!" } }))
|
||||
.render()
|
||||
}
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ 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!" } }))
|
||||
.add_component(Html::with(move |_| html! { h1 { "Hello World!" } }))
|
||||
.render()
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue