Hello
Whatās the best way to find an element inside a directive?
element.find(āelmā)?
element[0].querySelector(āelmā)?
Iāve seen in the ionic lib and sometimes they use element.find, but most of the times they use element[0].querySelector.
I always use .find, but i wantā to know the difference, Iāve tried to search for it, but there are several opinions about the two ways, but none could clarify my doubt.
So if someone could explain to me the difference between the both, i would be glad.
EDITED:
I think i got it!
element.find in jqlite only allows looking for tag names, if you want to find idās or classes, you will have to use element.querySelector, this without jQuery lib. Correct me if iām wrong.
Still is best to use element.find when looking for tag names instead querySelector?
Why?
Regards,
pcagica.