Trying to pull data from firebase and display.i keep taking this error:
TypeError: _this.db.list(…).subscribe is not a function
import { Component } from '@angular/core';
import { NavController } from 'ionic-angular';
import {AngularFireAuth} from 'angularfire2/auth';
import {AngularFireDatabase,FirebaseListObservable} from 'angularfire2/database';
@Component({
selector: 'page-profile',
templateUrl: 'profile.html'
})
export class ProfilePage {
profileData: FirebaseListObservable<any>
constructor(private fire:AngularFireAuth,private db :AngularFireDatabase,public navCtrl: NavController) {
this.fire.authState.subscribe(auth =>{
this.db.list(`/profile/${auth.uid}`).subscribe(profile => {
console.log(profile);
});
});
}
}
Any ideas ?