-
Hi, I have a more styli-ish question: I have an input checked based on a condition, right now I made it working with Like here: Is there a simpler/more cleaner way to do it? I tried using Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
At the moment I think an There is another option though.. If you don't care about the value of the attribute you can use boolean attributes: templ check(i int) {
<input
type="radio"
name="my-accordion-2"
checked?={ i == 0 }
/>
} Which results in: <input type="radio" name="my-accordion-2" checked> |
Beta Was this translation helpful? Give feedback.
At the moment I think an
if
statement is your best bet.There is another option though..
If you don't care about the value of the attribute you can use boolean attributes:
Which results in: