Skip to content

Instantly share code, notes, and snippets.

@Dylan0916
Last active April 13, 2019 12:33
Show Gist options
  • Save Dylan0916/3d2c333ccc0c8f53f0fee4c4d69e28a5 to your computer and use it in GitHub Desktop.
Save Dylan0916/3d2c333ccc0c8f53f0fee4c4d69e28a5 to your computer and use it in GitHub Desktop.
<button onclick="setData()">set</button>
<script>
const db = firebase.firestore();
function setData() {
db.collection("to-do-list").doc("to-do").set({
item: "處理 ...",
date: "20XX-XX-XX",
desctiption: "...",
});
}
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment