♻️ Atributos class e id explícitos en html!
Se usa `class="..."` e `id="..."` en lugar de `div.a #x`. El HTML generado es idéntico.
This commit is contained in:
parent
58d1fef4f1
commit
3f3634fdab
21 changed files with 80 additions and 74 deletions
|
|
@ -58,7 +58,7 @@ async fn homepage(request: HttpRequest) -> Result<Markup, ErrorPage> {
|
|||
button hx-get="/api/hello" hx-target="#result" {
|
||||
"Say hello"
|
||||
}
|
||||
div #result {}
|
||||
div id="result" {}
|
||||
}))
|
||||
.render().await
|
||||
}
|
||||
|
|
@ -79,7 +79,7 @@ async fn homepage(request: HttpRequest) -> Result<Markup, ErrorPage> {
|
|||
Page::new(request)
|
||||
.with_child(Html::with(move |cx| html! {
|
||||
button (props.unpack(cx)) { "Say hello" }
|
||||
div #result {}
|
||||
div id="result" {}
|
||||
}))
|
||||
.render().await
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue