Home » AngularJS ng-hide Directive

AngularJS ng-hide Directive

by Online Tutorials Library

AngularJS ng-hide Directive

The AngularJS ng-hide directive is used to hide the HTML element if the expression is set to true.

The element is shown if you remove the ng-hide CSS class and hidden, if you add the ng-hide CSS class onto the element. The ng-hide CSS class is predefined in AngularJS and sets the element’s display to none.

As a CSS class:

Parameter explanation:

expression: It specifies an expression that will hide the element if the expression returns true.

Let’s take an example to demonstrate ng-hide directive.

See this example:

Test it Now

You may also like