Answers for "how to delete firebase collection"

1

how to delete firebase collection

this.db
  .collection('cart')
  .get()
  .toPromise()
  .then((querySnapshot) => {
  querySnapshot.forEach((doc) => {
    doc.ref.delete();
  });
});
Posted by: Guest on December-19-2020
1

firestore javascript delete document

// define document location (Collection Name > Document Name > Collection Name >)
var docRef = Firebase.firestore().collection("Rooms").doc("bsYNIwEkjP237Ela6fUp").collection("Messages");

// delete the document
docRef.doc("lKjNIwEkjP537Ela6fhJ").delete();
Posted by: Guest on December-09-2020

Code answers related to "how to delete firebase collection"

Code answers related to "TypeScript"

Browse Popular Code Answers by Language