Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private noteListRef = this.db.list<Note>(`note-list/${auth.uid}`);
- constructor(private db: AngularFireDatabase, private fire:AngularFireAuth) {
- getNoteList() {
- return this.noteListRef;
- }
- addNote(note: Note) {
- return this.noteListRef.push(note);
- }
- updateNote(note: Note) {
- return this.noteListRef.update(note.key, note);
- }
- removeNote(note: Note) {
- return this.noteListRef.remove(note.key);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement