$index
拿到当前的id,在np-repeat中使用可以拿到数组中本条数据的内置id,
可以用来进行动态删除列表的操作。
<tbody>
<tr ng-repeat="x in attrlist">
<td><input type="checkbox" class="icheckbox_square-blue"></td>
<td><input class="form-control" placeholder="属性名称"></td>
<td>
<button type="button" class="btn btn-default" title="删除"
ng-click="attr_del($index)"><i class="fa fa-trash-o"></i> 删除
</button>
</td>
</tr>
</tbody>
数组的splice方法
删除数组中的元素,第一参数是index(索引),第二个是删除的个数
//新增拓展属性的删除
$scope.attr_del=function (index) {
$scope.attrlist.splice(index,1)
}