Hi!
I will let other to comment but just few remarks:
1) AngularJS is different, very, very different from jQuery in its
approach to building UI. In short (very, very simplified):
a) jQuery = focus on finding DOM elements and manipulating them
b) AngularJS = focus on mutating model and don't think about DOM elements
So it takes a bit of time to adjust but the resulting code is much
smaller and cleaner IMHO.
On Tue, Jan 15, 2013 at 7:40 PM, Silas Hansen <
silas...@gmail.com> wrote:
> Declaretively I would like the following: "For any input wrapped in a
> clearable-text class element, configure an existing sibling button to clear
> the property that the input is bound to".
For me it sounds imperative :-) Here you've got a step-by-step
instruction of how to do things.
With AngularJS you change model and don't instruct it about DOM manipulations.
> Is it just so that angular lacks the ability to do range-operations (based
> on some selector or criteria) like jQuery and I should just live with that?
I think that this is wrong question. As I've said, AngularJS is
radically different. So yes, I think you should give it a try and see
how it works for you.
> Or would it be possible using a directive? If it is, what would it look
> like?
IMO the solution I've send you is close to what I would do in a
real-life scenario if those inputs are not generated dynamically.
Anyway, I would suggest getting rid of jQuery while learning
AngularJS. jQuery is a fantastic library and serves many purposes but
if you want to learn AngularJS don't try to use as jQuery.
Cheers,
Pawel