Collection Reference extends Reference, Queryable

doc(path) → DocumentReference

Creates a nested document reference.

let coll = store.collection('ducks');
let ref = coll.doc('yellow'); // → document reference for 'ducks/yellow'
let coll = store.collection('ducks');
let ref = coll.doc('yellow/orders/first'); // → document reference for 'ducks/yellow/orders/first'