You have to use Array
's splice
method to remove it ($index
is ng-repeat's implicit index).
$scope.removeItem = function (index) {
$scope.items[index].$delete();
$scope.items.splice(index, 1);
}
And then in your HTML
<a ng-click="removeItem($index)">remove me</a>