Created
March 9, 2020 22:10
-
-
Save rakia/5e4a9ad698f3cf6eb7972f81d5b03041 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| openTodoDialog(mode: string, todo?: TODO): void { // mode = 'create' | 'update' | |
| const dialogRef = this.dialog.open(TodoDialog, { | |
| width: '800px', | |
| data: { mode: mode, todos: todo ? [todo] : [] } | |
| }); | |
| dialogRef.afterClosed().subscribe((result: TODO[]) => { | |
| if (result) { | |
| this.todoService.updateTodoList(result, mode); | |
| } | |
| }); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment