Skip to content

[Feature] Support default binding mode for html only components #380

Open
@michaelw85

Description

@michaelw85

I'm submitting a feature request

  • Library Version:
    1.10.0

Please tell us about your environment:

  • Operating System:
    Windows 10

  • Node Version:
    10.15.1

  • NPM Version:
    6.9.0

  • Browser:
    all

  • Language:
    all

Current behavior:
Settings default binding mode requires a class using the decorator.

Expected/desired behavior:
Expected to be able to set a default binding mode on view only custom elements in html

  • What is the motivation / use case for changing the behavior?
    I find the ability to create (simple) view only components very powerfull and satisfying in Aurelia. I'm working on a component library and the most basic components are mostly only templates wrapping native elements and exposing bindable attributes. For a radio or checkbox group passing the checked binding required a 2 way binding to be useful, by default it's a one way. Having to create a class with a single bindable is a shame its so much cleaner to just have the html file only.

Here's an old PR introducing the functionality: #309

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions