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

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

Sample using “ng-show” directive

<div ng-app=”myApp”>

<p ng-hide=”true”>Hidden Element</p>

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

</div>

Add ng-hide 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”>Hide Button
<button ng-hide = “showHideElement”>Save</button>