Reputation: 19463
angular.element and $ basically refer to the same thing. In angularjs, which one is best practice of doing and have better performance?
Upvotes: 0
Views: 748
Reputation: 2051
If you ask about best practice, it should be use angular.element
instead. Because Angular use jQLite by default in the angular.element
object, but if you include jQuery, it will become full jQuery, not jQLite. So it provide more safety to our code.
Here is the official reference.
Upvotes: 1