Created
April 13, 2019 12:48
-
-
Save Dylan0916/2fe00767dc457fcef934922723cd5640 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<button onclick="getData()">get</button> | |
<script> | |
function getData() { | |
const docs = db.collection("to-do-list").doc("to-do"); | |
docs | |
.get() | |
.then(doc => { | |
if (doc.exists) { | |
console.log(doc.data()); | |
} else { | |
console.log("找不到文件"); | |
} | |
}) | |
.catch(error => { | |
console.log("提取文件時出錯:", error); | |
}); | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment