You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: site/content/docs/02-template-syntax.md
+11
Original file line number
Diff line number
Diff line change
@@ -58,6 +58,17 @@ Or they can *be* JavaScript expressions.
58
58
59
59
---
60
60
61
+
Boolean attributes are included on the element if their value is [truthy](https://developer.mozilla.org/en-US/docs/Glossary/Truthy) and excluded if it's [falsy](https://developer.mozilla.org/en-US/docs/Glossary/Falsy).
62
+
63
+
All other attributes are included unless their value is [nullish](https://developer.mozilla.org/en-US/docs/Glossary/Nullish) (`null` or `undefined`).
64
+
65
+
```html
66
+
<inputrequired={false}placeholder="This input field is not required">
67
+
<divtitle={null}>This div has no title attribute</div>
68
+
```
69
+
70
+
---
71
+
61
72
An expression might include characters that would cause syntax highlighting to fail in regular HTML, so quoting the value is permitted. The quotes do not affect how the value is parsed:
0 commit comments