Answers for "five common positions for expressions in Lit templates"

0

five common positions for expressions in Lit templates

<!-- Child nodes -->
<h1>${this.pageTitle}</h1>

<!-- Attribute -->
<div class=${this.myTheme}></div>

<!-- Boolean attribute -->
<p ?hidden=${this.isHidden}>I may be in hiding.</p>

<!-- Property -->
<input .value=${this.value}>

<!-- Event listener -->
<button @click=${() => {console.log("You clicked a button.")}}>...</button>
Posted by: Guest on August-01-2021

Browse Popular Code Answers by Language