Я хочу знать, как получить списки из облачного пожарного магазина.
Я загружаю список так:
export interface Data {
name: string;
address: string;
address2: string;
pscode: string;
ccode: string;
name2: string;
}
constructor(private afs: AngularFirestore){
this.notesCollection = this.afs.collection(`imones`, (ref) => ref.orderBy('time', 'desc').limit(5));
}
notesCollection: AngularFirestoreCollection<Data>;
//creating item in list (imones)
createItem(){
this.notesCollection.add(this.busines);
}
Теперь вопрос в том, как получить оттуда все элементы списка?
Это моя попытка:
constructor(private afs: AngularFirestore){
this.items = this.notesCollection.valueChanges();
}
items: Observable<Data[]>;
HTML:
<p *ngFor="let item of items">{{item.name}}</p>
ОШИБКА:
Ошибка: не удается найти другой объект поддержки [[объект]]
типа «объект». NgFor поддерживает только привязку к Iterables, таким как
Массивы.
Снова ошибка:

