Advertisement
Guest User

Untitled

a guest
Feb 21st, 2019
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. private noteListRef = this.db.list<Note>(`note-list/${auth.uid}`);
  2.  
  3.  
  4. constructor(private db: AngularFireDatabase, private fire:AngularFireAuth) {
  5.  
  6. getNoteList() {
  7. return this.noteListRef;
  8. }
  9.  
  10. addNote(note: Note) {
  11. return this.noteListRef.push(note);
  12. }
  13.  
  14. updateNote(note: Note) {
  15. return this.noteListRef.update(note.key, note);
  16. }
  17.  
  18. removeNote(note: Note) {
  19. return this.noteListRef.remove(note.key);
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement