Skip to content

Instantly share code, notes, and snippets.

@gavilanch
Created June 25, 2019 21:45
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/53318d7cf3269387bce71164da3ff5a5 to your computer and use it in GitHub Desktop.
Save gavilanch/53318d7cf3269387bce71164da3ff5a5 to your computer and use it in GitHub Desktop.
if (this.createMode) {
     let todo: Todo = this.todoForm.value;
     todo.lastModifiedDate = new Date();
     todo.createdDate = new Date();
     todo.userId = this.user.uid; // <----
     this.todoService.saveTodo(todo)
       then(response => this.handleSuccessfulSaveTodo(response, todo))
       catch(err => console.error(err));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment