Collection Reference extends QueryableReference

See Queryable Reference for query load, query and condition methods which are shared between Collection and Condition references.

let ref = store.collection('messages');

id → string

Document id

path → string

Document path

parent → DocumentReference

Creates a new Document Reference which points to collections's parent

let coll = store.doc('users/zeeba/messages');
let ref = coll.parent;
ref.path // → 'users/zeeba'

doc(path)

Creates a new Document Reference which points to nested document.

let coll = store.collection('users');
let ref = coll.doc('zeeba');
ref.path // → 'users/zeeba'