it's confuse, since the documentation in the link on the issue titles it still is use FirebaseObjectObservable instead of AngularFireList<T> as is mentioned on this link https://github.com/angular/angularfire2/blob/master/docs/version-5-upgrade.md
here an image what I'm getting when I try to use AngularFireList<T> to retrive an object

please let me know how can I solve this issue?
thank you so much.
Let's try to make some points here:
AngularFireObject<any> author = db.object('authors').Observable<any> author = db.object('authors').valueChanges()AngularFireObject<any> author = db.object('authors/${authorId}') or AngularFireList<any> authorsList = db.list('authors')AngularFireObject<Author> instead of <any>import { Component, OnDestroy } from '@angular/core';I hope this answer is readable and helpful for you:)
export class AppComponent{
authors:AngularFireObject
constructor(db:AngularFireDatabase){
this.authors=db.object('/authors/1')
}
}
{{ (authors | async | json)?.name }}
I am also having a similar problem, trying to display the name of the author but nothing gets displayed and i get the InvalidPipeArgument argument
I also tried this format but still get nothing and the documentation seems to be outdated when it comes to using AngularFireObject
Hi @kaygeeklaas,
Maybe in the "get started" section is not fully updated, but here you have the documentation in detail, all fine :)
Anyway here is the solution to your problem:
db.object will return an AngularFireObject indeed, but what you need to display on the view is an Observable
component.ts
export class AppComponent {
authors:Observable<any>
constructor(db:AngularFireDatabase) {
this.authors=db.object('/authors/1').valueChanges();
}
}
component.html
{{ authors | async }}
I would encourage you to read a bit more of information about Observables in order to fully understand them
I've been struggling with firebase angular and observables a couple of days and this really helped me a lot. Thank you so much @javieraviles!
Im not getting any output whatsoever from my database. Anything wrong im doing. i followed this documentation but to no avail: https://github.com/angular/angularfire2/blob/master/docs/rtdb/lists.md
Most helpful comment
Let's try to make some points here:
AngularFireObject<any> author = db.object('authors').Observable<any> author = db.object('authors').valueChanges()AngularFireObject<any> author = db.object('authors/${authorId}')orAngularFireList<any> authorsList = db.list('authors')AngularFireObject<Author>instead of<any>import { Component, OnDestroy } from '@angular/core';I hope this answer is readable and helpful for you:)