错误:在ionic 3,firebase中,属性映射不存在类型“ {}”

时间:2018-10-14 05:32:39

标签: firebase ionic-framework

<ion-select (ionChange)='onContextChange($event)' [(ngModel)]='bands' multiple=false cancelText='cancel' okText='Show songs from selected'>
    <ion-option *ngFor='let band of bandsList$ | async' detail-push>
        {{band.name}}
    </ion-option>
</ion-select>

请看下面的代码:

onContextChange(ctxt:string):void{  this.songsList$=this.songService.assembleBandFilteredList(ctxt).snapshotChanges().pipe(map(changes=>{
  return changes.map(c=>({ //This map is throwing error
    key: c.payload.key, ...c.payload.val()
  }));
}))
console.log(this.songsList$);

}

filterByString(band:string){
    return this.angularFireDatabase.list('/song-list',ref=>ref.orderByChild('band').equalTo(band));
}

assembleBandFilteredList(ctxt:string):any{
    let a= this.filterByString(ctxt);
    console.log(a);
    return a;
}

类型{}上不存在地图上的可观察到的给出错误

0 个答案:

没有答案