HTML5:
<div class="col-md-4">
<h6>features:</h6>
<ol style="list-style-type: none;position: relative;right:1cm; ">
<li *ngFor="let item of Observable.array | async;let i = index;">item</li>
</ol>
</div>
打字稿+ Firestore:
this.itemList = this.afs.collection<Class>('Collection');
this.itemList.snapshotChanges().subscribe(list => {
this.list = [];
list.forEach(action => {
const id = action.payload.doc.id;
const data = action.payload.doc.data() as Class;
if (id === this.id) {
this.list.push(data);
this.Observable = this.itemList.doc(`/${this.id}`).valueChanges();
}
});
console.log(this.itemArray);
this.inDoorFeatures.subscribe(console.log);
});
注意:我想在Firestore中获取多叶数据或arrayList的$ value。