AngularJS ng-hide zhi ling

difa da wu yong

idake gurin gurin kaiya tureng-hide directive will hide HTML elements.

ng-hide is also a predefined CSS class in AngularJS, and will hide the element's display Set to none

Example

Hide part when checkbox is selected:

Hide HTML:<input type="checkbox" ng-model="myVar">
<div ng-hide="myVar">
<h1>Welcome</h1>
<p>Welcome to my home.</p>
</div>

Try it yourself

Syntax

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

When used as a CSS class:

<element class="ng-hide"></element>

All HTML elements support.

Parameters

Parameters Description
expression If the expression returns true, then the expression of the hidden element is hidden.