Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

support binding more "presence-only attributes" to an expression #694

Closed
@lanterndev

Description

@lanterndev

From e.g. the ng:checked docs:

The HTML specs do not require browsers to preserve the special attributes such as checked. (The presence of them means true and absence means false) This prevents the angular compiler from correctly retrieving the binding expression. To solve this problem, we introduce ng:checked.

The ng:disabled docs have something similar. But these aren't the only attributes whose mere presence (rather than value) determines behavior. The required attribute of input elements (introduced in html5) is one example, and I don't see a way to bind its presence to the result of an expression. I see there's ng:required, but it works differently, and begs the question (you'd have to bind its presence to an expression too). Is there currently some way to achieve this with the required attribute? With an arbitrary attribute?

P.S. Thanks for the awesome work. Angular is amazing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions