ionic3 - ERROR Error: Uncaught (in promise): Error: InvalidPipeArgument: '[object Object]' for pipe 'AsyncPipe'

后端 未结 2 956
一向
一向 2021-01-27 08:18

I did a news comment function by ionic3 with firebase, after testing comment function working already, but when I want the comment showing in my project error coming out.

<
2条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-27 09:12

    Try changing your contactsList declaration from

    contactsList:AngularFireList;

    to

    contactsList: Observable;

    Ensure that you're importing your Observable module as,

    import { Observable } from 'rxjs/Observable'
    

    Also your contactList variable assignment should be changed as,

    this.contactsList = this.firebaseService.getContactsList().valueChanges(); 
    

    Hope this helps!

提交回复
热议问题