// Get a reference to our posts
var ref = db.ref("server/saving-data/fireblog/posts");
// Get the data on a post that has been removed
ref.on("child_removed", function(snapshot) {
var deletedPost = snapshot.val();
console.log("The blog post titled '" + deletedPost.title + "' has been deleted");
});
db.collection("cities")
.onSnapshot(function(snapshot) {
snapshot.docChanges.forEach(function(change) {
if (change.type === "removed") {
console.log("Removed city: ", change.doc.data());
}
});
});
--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-tal...@googlegroups.com.
To post to this group, send email to fireba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/bc04710d-0dbc-4c15-8532-1c173bf81aaa%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.