Skip to content

Instantly share code, notes, and snippets.

@gavilanch
Created June 17, 2019 15:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gavilanch/05757ba8754c2b431559dff114cb5c69 to your computer and use it in GitHub Desktop.
Save gavilanch/05757ba8754c2b431559dff114cb5c69 to your computer and use it in GitHub Desktop.
handleDeleteClick(todoId: string, index: number) {
this.todoService.deleteTodo(todoId)
.then(() => {
this.todos.splice(index, 1);
})
.catch(err => console.error(err));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment