Skip to content

Aurelia should support boolean values for attributes. #347

@AshleyGrant

Description

@AshleyGrant

I should be able to tell Aurelia that an attribute's value should be treated as a boolean. This should work for both simple custom attributes as well as attributes on custom elements.

Usage:

<foo bar="false"></foo>

Custom Element VM:

export class Foo {
  @bindable({ isBoolean: true }) bar;
}

If the custom attribute or custom element tells Aurelia that it expects its value to be a boolean, the Aurelia will coerce the value to a boolean before setting the VM property and calling any changed callbacks.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions