Use this directive to force the angular.element library. This should be used to force either jqLite by leaving ng-jq blank or setting the name of the jquery variable under window (eg. jQuery).
Since this directive is global for the angular library, it is recommended
that it's added to the same element as ng-app or the HTML element, but it is not mandatory.
It needs to be noted that only the first instance of ng-jq
will be used and all others
ignored.
<ANY
[the=""]>
...
</ANY>
Param | Type | Details |
---|---|---|
the
(optional)
|
string |
name of the library available under |
This example shows how to force jqLite using the ngJq
directive to the html
tag.
<!doctype html>
<html ng-app ng-jq>
...
...
</html>
This example shows how to use a jQuery based library of a different name. The library name must be available at the top most 'window'.
<!doctype html>
<html ng-app ng-jq="jQueryLib">
...
...
</html>