Guest User

Untitled

a guest
Jan 18th, 2019
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. methods: {
  2. fetchNavbarLinks() {
  3. console.log("querying firestore...");
  4. db.collection("components/navbar/links")
  5. .orderBy("displayOrder")
  6. .get()
  7. .then(snapshot => {
  8. snapshot.docs.forEach(doc => {
  9. if (doc.exists) {
  10. console.log(doc.data());
  11. this.navbarLinks.push(doc.data());
  12. } else if (error) {
  13. console.log("Error fetching document!", error.message);
  14. }
  15. });
  16. });
  17. }
  18. }
Add Comment
Please, Sign In to add comment