Skip to content

TypeScript code snippet – How to delete firebase collection?

this.db
  .collection('cart')
  .get()
  .toPromise()
  .then((querySnapshot) => {
  querySnapshot.forEach((doc) => {
    doc.ref.delete();
  });
});
See also  CSS code snippet - How to make gradient backgroud cover whole page in html?

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.