| $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