Angularjs 是否有某种方法可以启用/禁用以角度显示表格中的列?
我有以下资料:Angularjs 是否有某种方法可以启用/禁用以角度显示表格中的列?,angularjs,Angularjs,我有以下资料: <select data-ng-model="option.selectedValue" data-ng-options="item.id as item.name for item in option.selects"> </select> <table> <thead> <tr> <th>Id</th>
<select
data-ng-model="option.selectedValue"
data-ng-options="item.id as item.name for item in option.selects">
</select>
<table>
<thead>
<tr>
<th>Id</th>
<th>City</th>
<th>Street</th>
</tr>
</thead>
<tbody class="grid">
<tr data-ng-repeat="row in grid.data">
<td>{{ row.iD }}</td>
<td>{{ row.city }}</td>
<td>{{ row.street }}</td>
</tr>
</tbody>
</table>
身份证件
城市
大街
{{row.iD}}
{{row.city}}
{{row.street}}
是否有办法更改它,使街道列仅在
选项.selectedValue
等于0时才可见在{row.street}
和街道
行上尝试此操作
<th ng-show='option.selectedValue == 0'>Street</th>
...
<td ng-show='option.selectedValue == 0'>{{row.street}}</td>
街
...
{{row.street}}
或
街
...
{{row.street}}
是一样的;) 在你的
{{row.street}
和street
行上试试这个
<th ng-show='option.selectedValue == 0'>Street</th>
...
<td ng-show='option.selectedValue == 0'>{{row.street}}</td>
街
...
{{row.street}}
或
街
...
{{row.street}}
是一样的;) 使用ng show。您需要同时隐藏
标题列
和内容列
<th ng-show="option.selectedValue == 0">Street</th>
<td ng-show="option.selectedValue == 0">{{ row.street }}</td>
街
{{row.street}}
使用ng show。您需要同时隐藏
标题列
和内容列
<th ng-show="option.selectedValue == 0">Street</th>
<td ng-show="option.selectedValue == 0">{{ row.street }}</td>
街
{{row.street}}
你可以做:{{row.street}}你可以做:{{row.street}