What is the use of “ng-show” directive in AngularJS?

The ng-show directive shows or hides an HTML element using AngularJS.

Sample using “ng-show” directive

<div ng-app=”myApp”>

<p ng-show=”true”>Visible Element</p>

<p ng-show=”false”>Hidden Element</p>

</div>

ng-show attribute to a HTML button and pass it a model. Bind the model to an checkbox and see the variation.

Show / Hide “Save” button

<input type = “checkbox” ng-model = “showHideElement”>Show Button
<button ng-show = “showHideElement”>Save</button>