Ha! I wanted to slap myself after reading this. It's amazing how dependent 
you get on jQuery after a while. Eevn to the point that you forget that you 
can find dom elements without it!

On Wednesday, June 26, 2013 9:42:20 PM UTC+2, Ricardo Bin wrote:
>
> Theres a very easier way to do this.
>
> Use native querySelector or even $document service
>
> http://jsfiddle.net/ricardohbin/fTQcs/
>
> Em quarta-feira, 26 de junho de 2013 16h02min13s UTC-3, Lior M escreveu:
>>
>> 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