The
ngShow
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
.