我遇到的问题是,如果我有 2 行或更多行,然后想删除一行,它会同时删除所有行。也许他们有联系或不联系,奇怪的行为。
在我添加OrderByPriority
以搜索表格后出现了此问题。如果我删除OrderByPriority
我可以单独删除行,但随后我无法搜索......有没有办法我可以搜索表格,并且还可以删除单行,而无需同时删除所有行,只需删除一行。
对想法和想法持开放态度。
点击这里查看普朗克
索引中部件的快照.html:
<table class="table table-striped">
<thead>
<tr>
<th>#</th>
<th>Plate Number</th>
<th>Description</th>
<th>Price</th>
<th></th>
</tr>
</thead>
<tbody>
<tr ng-repeat="(id, item) in items | orderByPriority | filter:search">
<td>
传递火碱项$id
以删除火碱上的实际行
ng-click="removeItem(item.$id)"
item.$id 由 Firebase 生成,在所有元素中都是唯一的;因此,您必须传递此$id才能删除实际项目。