angularjs - Difference between using jQuery and angular element reference in angular directive -


i want wrap jquery in angular. in link function

 $('#slider').slider(); 

but wondering difference to....

 $(elem).slider(); 

because second 1 'sort of' works.

the 'elem' variable in link function 'made' angular using jqlite.

from docs:

jqlite tiny, api-compatible subset of jquery allows angular manipulate dom in cross-browser compatible way. jqlite implements commonly needed functionality goal of having small footprint.


Comments

Popular posts from this blog

javascript - How to process users in one specific order using map o each function? -

java - Two interface have same method name with different return type -

javascript - Linking from page A to a specific iframe on page B -