Skip to content

Support for two-way binding on custom elements #892

Closed
@nsaunders

Description

Custom Elements (as in Web Components) cannot currently take advantage of two-way binding syntax.

For example, instead of this...

<custom-textbox
  label="Email Address"
  type="email"
  placeholder="Enter your email address"
  style="width: 300px"
  bind:value="email" />

...I have to do this...

<custom-textbox
  label="Email Address"
  type="email"
  placeholder="Enter your email address"
  style="width: 300px"
  value="{{email}}"
  on:input="set({ email: event.target.value })" />

I think this is kind of a bummer. :-(

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions