Binding
<template>
<label for="nameField">
Who to greet?
</label>
<input type="text" value.bind="name" id="nameField">
<label for="arrivingBox">
Arriving?
</label>
<input type="checkbox" checked.bind="arriving" id="arrivingBox">
<p>
${arriving ? 'Hello' : 'Goodbye'}, ${name}!
</p>
</template>export class Greeter {
constructor() {
this.name = 'John Doe';
this.arriving = true;
}
}Binding focus
Binding scopes using with
Last updated
Was this helpful?