我正在尝试通过userId过滤屏幕快照中的firebase列表。我正在使用以下内容:
constructor(private afAuth: AngularFireAuth,) {
this.afAuth.authState.subscribe(user => {
this.userId = user.uid
});
}
ngOnInit(){
const baseList = firebase.database().ref('itineraries');
this.myItineraryList$ =
baseList.orderByChild('userId').equalTo(this.userId);
}
HTML
<div *ngFor="let userItinerary of myItineraryList$ | async">
<ion-card class="itinerary-module">
<ion-card-content>
<itinerary-list
[userItinerary]="userItinerary">
</itinerary-list>
</ion-card-content>
</ion-card>
</div>
我在控制台中收到以下错误:
ERROR Error: InvalidPipeArgument: 'https://fir-
92abc.firebaseio.com/itineraries' for pipe 'AsyncPipe'
但是,如果我取出AsyncPipe,它仍然不会检索该列表。