-
Notifications
You must be signed in to change notification settings - Fork 354
Add a ui-for directive for associating form labels with inputs #59
Comments
I've felt the same way when coding up forms. Here's an idea:
|
This could work, however I think Pete suggested almost the same exact thing on the google group and the thing is for me personally, I don't put the label right before (or next to) the original input all the time. If I could put a label right before the input, I feel like I might as well wrap the input in the label altogether and not worry about the for-attribute (if my CSS can handle it). For this reason I'm still interested in finding an alternate solution. However this does not mean we can't also implement the solution you suggest, I'm just holding out for a more versatile solution. |
Probably will need to happen in stages. |
Agreed Sent from my iPhone On Sep 23, 2012, at 1:36 AM, Pawel Kozlowski [email protected] wrote:
|
Alright, just realize that I would like to continue to break ui-input into sub-directives whenever possible. |
Sure, I'm also not fan of big fat directives. I've got couple of ideas |
I don't want to have to ID every single
<input>
I use just so that my<label>
can be properly attached. The need for an ID is also further rendered useless with the use of ng-model (which is essentially an identifier for the input). The idea would be that you could simply do and the label would automatically be attached to the (nearest/first?) input that uses that model.Issues:
Features:
The text was updated successfully, but these errors were encountered: