Having an issue with my component. Struggling to retrieve data from Firebase. Can someone spot the error in the code below?
import { Component, OnInit, Input, ViewChild } from '@angular/core';
import { AngularFireDatabase, FirebaseListObservable } from 'angularfire2/database';
@Component({
selector: 'app-dashboard',
templateUrl: './dashboard.component.html'
})
export class DashboardComponent implements OnInit {
tasks: FirebaseListObservable<any[]>;
constructor(
public afdb: AngularFireDatabase
) {
this.tasks = this.afdb.list('scheduler/')
console.log("Console", this.tasks);
}
ngOnInit() {
}
}
Upon running the code, the console output is as follows:
{query: Reference, update: ƒ, set: ƒ, push: ƒ, remove: ƒ, …}
auditTrail
:
ƒ (events){query: Reference, update: ƒ, set: ƒ, push: ƒ, remove: ƒ, …}
auditTrail
:
ƒ (events)