Feature Request: Array Operations
Will there be support for the newer array operations?
From the docs:
var washingtonRef = db.collection("cities").doc("DC");
// Atomically add a new region to the "regions" array field.
washingtonRef.update({
regions: firebase.firestore.FieldValue.arrayUnion("greater_virginia")
});
// Atomically remove a region from the "regions" array field.
washingtonRef.update({
regions: firebase.firestore.FieldValue.arrayRemove("east_coast")
});
https://firebase.google.com/docs/firestore/manage-data/add-data#update_elements_in_an_array
@JonesM87 Did you find a workaround for this in the meantime?
@troydcthompson I just stored the field data/array locally, made any manipulations I needed to, then updated the doc field. The arrays I'm manipulation are pretty small so this seems ok for now but does mean an additional read from the db.
All this works w/AngularFire, you'll just need to update your Firebase/Firestore dependencies.
import firebase from 'firebase/app' needs to be imported as well?
I am also facing this array update issue how to do that using angular fire