Two-Way Binding
class MyComponent extends wire.ui.WebComponent {
static get properties() {
return {
message: true
}
}
static get template() {
return '<input wr-value="message">';
}
}aclass MyPage extends wire.ui.WebComponent {
sourceProperty = "Hello web components";
static get template() {
return '<my-component wr-message="sourceProperty"></my-component>';
}
}
customElements.define('my-page', MyPage);Last updated