'query' does not exist in type 'QueryFn' | angularfire2

后端 未结 5 1213
渐次进展
渐次进展 2021-02-09 04:18

Argument of type \'{ query: { limitTolast: number; orderByKey: boolean; }; }\' is not assignable to parameter of type \'QueryFn\'.Object literal may only specify known propertie

5条回答
  •  你的背包
    2021-02-09 05:13

    due to update on Angular Fire, replace FirebaseListObservable to AngularFireList and make sure you return firebase.database.Query like this

     getMessages(): AngularFireList {
        return this.db.list('messages', ref => {
          return ref.limitToLast(25).orderByKey();
        });
      }

提交回复
热议问题