【发布时间】:2018-04-11 19:25:25
【问题描述】:
我目前正在研究 Angular 5 和 Firestore。我有一个可观察的数组 activities ,其中有一个 firestore 集合。我将 firestore 的领域理解为:
activities: Observable<any[]>;
this.activities = this.afs.collection('activities').valueChanges();
还有显示活动价值的表格:
<table class="table">
<thead>
<tr>
<th>Section</th>
<th>Name</th>
<th>Max Players</th>
<th >Locked</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let activity of activities | async >
<td>
{{activity.section}}
</td>
<td >
{{activity.name}}
</td>
<td>
{{activity.maxPlayers}}
</td>
<td>
{{activity.locked}}
</td>
</tr>
</tbody>
</table>
现在我想通过 activity.name 添加搜索方法的功能。我遵循了很多过滤教程,但没有任何效果。我是 Angular 新手。
【问题讨论】:
标签: angular google-cloud-firestore angularfire2