AngularFIRE Property 'subscribe' does not exist on type 'AngularFireList<{}>'

后端 未结 5 1726
名媛妹妹
名媛妹妹 2021-02-06 03:18

I\'m following this tutorial about how to connect angular with firebase database. But in minute 17:30 I\'m getting this error:

Property \'subscribe\' does not ex

5条回答
  •  一个人的身影
    2021-02-06 03:59

    A simpler change would to be add valueChanges() before .subscribe()

    db.list('/Country/countries').valueChanges().subscribe(countries => {
        this.countries = countries;
        console.log(this.countries);
    });
    

提交回复
热议问题