WEB DEVELOPER SITE
HTMLCSSJAVASCRIPTSQLPHPBOOTSTRAPJQUERYANGULARXML
 

AngularJS ng-show Directive


Example

Show a segment when a checkbox is checked:

Show HTML: <input type="checkbox" ng-model="myVar">
<div ng-show="myVar">
<h1>Welcome</h1>
<p>Welcome to my home.</p>
</div>
Try it yourself »

Definition and Usage

The ng-show mandate demonstrates the predefined HTML component if the articulation assesses to genuine, generally the HTML component is hidden.


Syntax

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

Supported by all HTML elements.


Parameter Values

Value Description
expression An articulation that will demonstrate the component just if the articulation returns true.