In the following example:
{{item.title}}
showItem can be updated to return early if the passed in item no longer exists:
showItem
item
function remove(item) { if (-1 == $scope.items.indexOf(item)) { // Item no longer exists, return early return; } // Rest of code here }