I have a view that subscribe
to a FirebaseListObservable
and a form that does CRUD operations on a range of objects in that list.
It will iterate over the keys and update the database like so:
let list = this.angularFire.database.list('items/' + listkey);
keys.forEach((key) => list.update(key, item[key]));
The problem is that the subscription issue a new list for each update, whereas I only need the list when all the transactions are complete.
I have tried to manipulate the list before updating the database using the FirebaseObjectObservable
on the listkey
but it throws an error due to invalid characters in the metafields (like $key
and $exist
).
Right now I am using a debounceTime
on the subscription but I am not sure if that is the proper implementation or not.
Is there a way to concat the updates into a single transaction?