You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 19, 2025. It is now read-only.
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:
What if there are multiple inputs with the same ng-model? (probably should just use the first match or nearest match)
Is it acceptable to search the nearby DOM from within a directive (this is not normally done)
What if multiple inputs on the page use the same model, but represent different references (such as within ng-repeat)
Features:
Leverage existing IDs on the input if one is already present