I try to get an object from Firebase with AngularFire and use angularfirelist. However, it did not return an object as I expected. Here is my code****emphasized text
export class AdminProductsComponent implements OnInit {
products$ : AngularFireList<unknown>;
constructor(private productService :ProductService) {
this.products$ = this.productService.getAll();
console.log("helo");
console.log(this.products$);
**SERVICE PRODUCT.TS**
export class ProductService {
constructor(private db : AngularFireDatabase) { }
create(product)
{
return this.db.list('/product').push(product);
}
// getAll() {
// return this.db.list('/product')
// .snapshotChanges()
// .pipe(map(changes => changes.map(c => ({
// $key: c.payload.key, $value: c.payload.val()
// }))));
// }
getAll()
{
return this.db.list('/product');
}
// getAll method return type is (method) ProductService.getAll():
//AngularFireList
** this is object i got from firebase i can't able to understand this .help me out **
in chrome console i got
`
{query: Reference, update: ƒ, set: ƒ, push: ƒ, remove: ƒ, …}
auditTrail: ƒ auditTrail(events)
push: (data) => query.ref.push(data)
query: Reference {repo: Repo, path: Path, queryParams_: QueryParams, orderByCalled_: false}
remove: ƒ remove(item)
set: ƒ dataOperation(item, value)
snapshotChanges: ƒ snapshotChanges(events)
stateChanges: ƒ stateChanges(events)
update: ƒ dataOperation(item, value)
valueChanges: valueChanges(events) { /** @type {?} */ const snapshotChanges$ = snapshotChanges(query, events, outsideAngularScheduler); return snapshotChanges$.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["map"])((/** * @param {?} actions * @return {?} */ actions => {…}
proto: Object