[英]Hide table with ng-hide on click?
這是我的html:
<tr ng-repeat-end ng-show="modelRow.activeRow==car.name" class="hidden-table">
<td colspan="6">
<table class="table table-striped table-bordered table-condensed table-hover">
<thead>
<tr>
<th>Year</th>
<th>Reviews</th>
如您所見,我有ng-show="modelRow.activeRow==car.name"
。 我也有導航選項卡,當我單擊另一個選項卡時,表格仍然顯示。 那么,如何通過ng-click
某個按鈕隱藏我的表格?
在按鈕上單擊,設置一些標記,例如hide_table為1。 然后在表格標簽中使用ng-show
檢查hide_table標簽值
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.