我正在尝试使用id检索我的文档,但无法弄明白.
目前我检索我的文件是这样的:
const racesCollection: AngularFirestoreCollection<Races> = this.afs.collection('races');
return racesCollection.valueChanges();
Run Code Online (Sandbox Code Playgroud)
我确实完整地获得了我的文档列表,但是没有文档ID.
如何为每个文档检索它?
当前设置:
预期行为:
当前行为:
附加条款) :
代码示例:
<mat-select placeholder="Multiclassement" [(ngModel)]="classe.multiclassement" multiple>
<mat-option *ngFor="let c of classes | async" [value]="c">{{c.nom}}</mat-option>
</mat-select>Run Code Online (Sandbox Code Playgroud)
select firebase angular-material angular google-cloud-firestore