I can add and retrieve items just fine but when I delete, it removes the whole node, programs instead.
I tried putting the key directly at the this.programListRef.remove(key manually put here); but still got the same results.
I then checked my programListRef, nothing seemed wrong too.
Here is the code
export class ProgramService { //list variables programListRef: AngularFireList<Program>; programList: Observable<Program[]>; //object variables programObjRef: AngularFireObject<Program>; programObj: Observable<Program>; constructor(private afDB: AngularFireDatabase) { this.programListRef = afDB.list('programs'); //use snapshot changes.map to store key this.programList = this.programListRef.snapshotChanges().pipe( map(changes => changes.map(c => ({ key: c.payload.key, ...c.payload.val() })) ) ); } getProgramList() { return this.programList; } getProgramObj(id:string) { this.programObjRef = this.afDB.object('programs/'+id); this.programObj = this.programObjRef.valueChanges(); return this.programObj; } addProgramObj(programObj:Program) { this.programListRef.push(programObj); } updateProgramObj(id:string, programObj:Program){ this.programListRef.update(id, programObj); } //The problematic code deleteProgramObj(id:string){ this.programListRef.remove(id); } } Any hint would be greatly appreciated, thank you for reading!