$scope.hide_emptytable() = function{
if ($.trim($('.acf-dynamic-table .field').text())=="") {
$('.acf-dynamic-table').hide();
}
}
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.4/angular.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js"></script>
<div ng-repeat="t in[]">
<table class="acf-dynamic-table">
<tr>
<td>Name</td>
<td>Address</td>
</tr>
<tr>
<td class="field">t.name</td>
<td class="field"><span>t.ward_no</span> <span>t.street</span> <span>t.city</span> <span>t.state</span> <span>t.postcode</span></td>
</tr>
</table>
</div>
<div ng-repeat="t in []">
<table class="acf-dynamic-table">
<tr>
<td>Name</td>
<td>Address</td>
</tr>
<tr>
<td class="field"></td>
<td class="field"><span></span> <span></span> <span></span> <span></span> <span></span></td>
</tr>
</table>
</div>
<span style="display : none">{{hide_emptytable()}}</span>
我想隐藏的表,如果与类字段列的值是空的。例如第二个表应该隐藏,但它不工作。 对于地址,值在它们之间的一个空间范围内。
不知道,如果你的问题其原因,但:'= {功能'是你没有的参数列表,比如'功能(语法错误){' –