ngHide directive

The ngHide directive changes the visibility of an element based on its display property:

snippet
<div ng-show="cars.length == 0">
<table>
<thead>
<tr>
<th></th>
<th>Plate</th>
<th>Color</th>
<th>Entrance</th>
</tr>
</thead>
<tbody>
<tr ng-class="{selected: car.selected}" ng-repeat="car in cars">
<td>
<input type="checkbox" ngmodel="car.selected" />
</td>
<td><span ng-bind="car.plate"></span></td>
<td><span ng-bind="car.color"></span></td>
<td><span ng-bind="car.entrance"></span></td>
</tr>
</tbody>
</table>
</div>
<div ng-hide="cars.length > 0">
The parking lot is empty
</div>

Depending on the implementation, you can use the complementary ngHide directive of ngShow.
Related Tutorial
Follow Us
https://www.facebook.com/Rookie-Nerd-638990322793530 https://twitter.com/RookieNerdTutor https://plus.google.com/b/117136517396468545840 #
Contents +