For angular 8 and Firebase 6 you can use the option id field
getAllDocs() {
const ref = this.db.collection('items');
return ref.valueChanges({idField: 'customIdName'});
}
this adds the Id of the document on the object with a specified key (customIdName)