Skip to content

Instantly share code, notes, and snippets.

/gist:f16b255533a348fd86f4 Secret
Created Dec 6, 2014

Embed
What would you like to do?
$scope.remove = (id) ->
return unless confirm('Are you sure?')
for person in $scope.persons
Person.delete({personId: id}, ->
$scope.persons.pop($scope.persons.indexOf(person))
) if person.id == id
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.