Another way will be to use $element[0].querySelector('.className'); 

On Wednesday, June 26, 2013 12:02:13 PM UTC-7, Lior M wrote:
>
> 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.

Reply via email to