support binding more "presence-only attributes" to an expression #694
Description
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.