<tr ng-repeat = "app in apps" ng-hide = "">
<td>
<a data-uk-modal="{target:'#{{app._id}}'}">{{app.name}}</a>
</td>
<td>{{app._id}}</td>
<td>{{app.author}}</td>
<td>{{appCategoryMap[app.category].name}}</td>
<td>
<a class="uk-button uk-button-danger" ng-click = "underCarriage(app._id)">下架</a>
</td>
</tr>
ng-hide里面应该怎么去写,如果写入变量的话,全部的列表项都是同一个ng-hide变量无法隐藏单个
Please describe your problem carefully, so that others will take your problem seriously.
You just want to click "Remove" and this row will disappear from the table. In fact, it is to delete a record in the data,
AngularJS
的绑定机制会自动的更新界面,这一行也就会自动消失了。不需要使用ng-hide
.You just need to implement it well
underCarriage(app._id)
:My local test can achieve the effect.
Add a hidden attribute to apps to record whether it is hidden
http://jsfiddle.net/larvata/1wr2bfLs/