AngularJS

AngularJS Directives

AngularJS Filters and Elements

AngularJS Tutorials

AngularJS ng if Directive

AngularJS ng-if Directive

 

 

The ng-if directive is used to remove the HTML element if the expression evaluates to false. Otherwise, a copy of the Element is added to the DOM.

 

Syntax:-

 

< element ng-if="expression" >< /element >

 

Further Explanation:-

 

Value Description
expression An expression that will completely remove the element if it returns false. If it returns true, a copy of the element will be inserted instead.

Code Explanation

All Tutorials related to AngularJS Directives

All Sections related to AngularJS