Javatpoint Logo
Javatpoint Logo

AngularJS ng-show Directive

The AngularJS ng-show directive is used to show or hide the given HTML element according to the expression given to the ng-show attribute.

It shows the specified HTML element if the given expression is true, otherwise it hides the HTML element.

It is supported by all HTML elements.

Syntax:

Parameter explanation:

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

Let's take an example to demonstrate the ng-show directive.

See this example:

Test it Now



Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA