Tutorialsplane

angular.element


angular.element Function – This function is basically alias for the jQuery. If jQuery is not available angular.element can be used. angular.element is built in sub set “jQuery”, which is called “jQuery lite” or “jQlite”

Here in this tutorial we are going to explain the angular.element with example and demo. You can use our online editor to edit and run the example.


angular.element Syntax | Example | Demo

Syntax

Syntax for the angular.element is given below –

Syntax:

angular.element(element);

Where element is DOM element.

Arguments

AngularJs jqLite Available Functions

Following jQuery methods are avialable in jQlite –

Example

Here is simple example of angular element function-

angular.element Example :




 
 

  
<div ng-app="myApp">  
<div ng-controller="myController"> 
 
 
</div> 
</div>
  
      

Try it »

Here we have create an example which have both method to create function and call it. You run the above example to see how jQuery lite works in angularJs. If you run the above example it will produce output something like this –

AngularJs Api Refrence

AngularJs Directive