Firebase - cccnqu/wd106b GitHub Wiki

Firebase

範例

Realtime Database

Cloud Firestore

var messageRef = db.collection('rooms').doc('roomA').collection('messages').doc('message1');

Notice the alternating pattern of collections and documents. Your collections and documents must always follow this pattern. You cannot reference a collection in a collection or a document in a document.