1.添加 ng-click="delete($index)
<!--标签内容-->
<div class="list_body active">
<ul>
<li class="item" ng-repeat="item in taskList">
...
<!--注册删除事件-->
<span class="del" ng-click="delete($index)">删除</span>
<span class="detail">详情</span>
</li>
</ul>
</div>
2.添加删除方法 index.js
app.controller('taskController', ['$scope', function ($scope) {
...
//定义删除方法
$scope.delete = function (key) {
//删除key元素, 删除1个
$scope.taskList.splice(key, 1);
}
}]);