【发布时间】:2016-10-01 20:35:10
【问题描述】:
我想在按下按钮时显示<td>。 TD 也应该处于隐藏状态和页面加载。
我要显示的<td> 还包含一个下拉列表。我希望在第一次单击按钮时显示此 <select>。
我使用 ng-repeat 创建的 Angular 表是:
<div class="widget-content" ng-controller="getAllBenchersController">
<table ng-table="talentPoolList" show-filter="true" class="table table-striped table-bordered">
<tr ng-repeat="employee in data | filter: testFilter">
<td data-title="'#'">{{$index + 1}}</td>
<td data-title="'Select Account'">
<select>
<option disabled selected value> -- select an option -- </option>
<option id="selectedLocked">Blocked</option>
<option id="selectedBilled">Billed<//option>
<option id="selectedShadow">Shadow</option>
<option id="selectedOnNotice">OnNotice</option>
<option id="selectedPOC">POC</option>
</select>
</td>
<td>
<a><button class="btn btn-success" ng-model="checked">Reserve</button></a>
</td>
</tr>
</table>
</div>
然后我希望按钮在第二次点击时发布数据。我可以这样做,但显示<td> 的代码不应影响第二个按钮单击功能的工作。
我是 Angular 新手,不知道如何实现这一点。
有人可以帮忙吗?
【问题讨论】:
标签: angularjs angularjs-ng-repeat html-table