I’m trying to update multiple values in the firebase but I have small problem in the below code.
My application works fine in the first click on update button.
But when I click on update button again, I don’t know why the application stuck.
public list1: FirebaseListObservable<any[]>;
public list2: FirebaseListObservable<any[]>;
...
...
function(id,title,desc){
this.list1.subscribe(dataX => {
dataX.forEach(L1=> {
if(L1.nID==id){
this.list1.update(L1.$key, {
title: title,
desc: desc
})
}
})
})
}