Wraps a raw DOM element or HTML string as jQuery element.
angular.element
is either an alias for jQuery function if
jQuery is loaded or a function that wraps the element or string in angular's jQuery lite
implementation.
Real jQuery always takes precedence (as long as it was loaded before DOMContentEvent
)
Angular's jQuery lite implementation is a tiny API-compatible subset of jQuery which allows angular to manipulate DOM. The jQuery lite implements only a subset of jQuery api, with the focus on the most commonly needed functionality and minimal footprint. For this reason only a limited number of jQuery methods, arguments and invocation styles are supported.
NOTE: All element references in angular are always wrapped with jQuery (lite) and are never raw DOM references.
version:
scope()
- retrieves the current angular scope of the element.angular.element(element);
element – {string|DOMElement} –
HTML string or DOMElement to be wrapped into jQuery.
{Object}
– jQuery object.