Quick question: why do you need to find the element? Cause i'm guessing you
are trying to get some data but why not use an ng-click function on it with
some var included that will trigger something in your controller (to bind
the data to a certain var in $scope).
You can also use a ng-model or something to get around finding items.
Op woensdag 26 juni 2013 21:02:13 UTC+2 schreef Lior M:
>
> hi all
>
> I'm trying to remove jquery from my Angular.js app in order to make it
> lighter, and put Angular's jqLite instead. But the app makes heavy use of
> find('#id') and find ('.classname'), which are not supported by jqLite,
> only 'tag names' (as per documentation)
>
> wondered what do u feel would be the best approach to change it. One
> approach I thought about is to create custom HTML tags. for example: change
> <span class="btn btn-large" id="add-to-bag">Add to bag</span>
>
> to
>
> <a2b style="display:none;"><span class="btn btn-large" >Add to
> bag</span></a2b>
>
> and
>
> $element.find('#add-to-bag')
>
> to
>
> $element.find('a2b')
>
> Any thoughts? any other ideas (i.e. get away without .find at all)?
>
> thanks
>
> Lior
> PS: this is a copy of a question asked in stackoverflow:
> http://stackoverflow.com/questions/17283697/angularjs-how-to-find-using-jqlite#comment25059367_17283697
>
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.