Argument of type '{ query: { limitToLast: number; orderByKey: boolean; }; }' is not assignable to parameter of type 'FirebaseListFactoryOpts'

前端 未结 2 803
清歌不尽
清歌不尽 2021-01-26 19:09
    user: any;
     chatMessages: FirebaseListObservable;
     chatMessage: ChatMessage;
     userName: Observable;
         construct         


        
相关标签:
2条回答
  • 2021-01-26 19:50
    getMessages(): AngularFireList<ChatMessage[]> {
    return this.db.list('messages',ref => ref.orderByKey().limitToLast(25));
    }
    

    use this instead of that now this will work because FireBaseListObservable is replaced with AngularFirelist.

    0 讨论(0)
  • 2021-01-26 20:06

    Check your types buddy, you are assigning the query result in different type of firebase datatype this is not going to work debug your code with correct data types and check on Google if there is changes are made to this code due to a version change. Due to consistently changing of versions in Web development technologies this kind of issue is common. Good luck

    0 讨论(0)
提交回复
热议问题