Skip to content Skip to sidebar Skip to footer

Ionic3 - Error Error: Uncaught (in Promise): Error: Invalidpipeargument: '[object Object]' For Pipe 'asyncpipe'

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. ERROR Er

Solution 1:

You need to first convert the AngularFireList to an Observable :

contactsList: Observable<any[]>;

And in your constructor, you need to call valueChanges() on it. This is since AngularFire2 Version 5.

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

This will return the data through the observable without $key or $value. In order to print in html,use

  {{contact}}

instead of

  {{contact.$value}}

Solution 2:

Try changing your contactsList declaration from

contactsList:AngularFireList<any>;

to

contactsList: Observable<any[]>;

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!

Post a Comment for "Ionic3 - Error Error: Uncaught (in Promise): Error: Invalidpipeargument: '[object Object]' For Pipe 'asyncpipe'"