Javatpoint Logo
Javatpoint Logo

AngularJS ng-jq Directive

The AngularJS ng-jq directive is used to force the angular.element library. This directive forces either jqLite by leaving ng-jq blank or sets the name of the jQuery variable under window. It is used before the script which loads Angular.

Syntax:

Parameter explanation:

ng-jq: It is an optional string type which specifies the name of the library available under window to be used for angular.element.

Let's take an example to demonstrate the usage of ng-jq directive.

See this example:

This example specifies how to force jqLite using the ngJq directive to the html tag.

Using a jQuery based library of a different name:





Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA