I'm trying to add firebase to ionic 3 but I'm getting an error on Object (...) not a function, everything runs well until the subscribe function gets executed then the error shows, I've done all needed integration and here my home.ts code
import { Component } from '@angular/core';
import { NavController } from 'ionic-angular';
import { FirstPage } from '../first/first';
import { AskPage } from '../ask/ask';
import {AngularFireDatabase} from 'angularfire2/database'
@Component({
selector: 'page-home',
templateUrl: 'home.html'
})
export class HomePage {
constructor(public navCtrl: NavController,
public afd : AngularFireDatabase) {
this.getDataFromFireBase();
}
getDataFromFireBase(){
this.afd.list('/Heros/').valueChanges().subscribe(
data => {
console.log(JSON.stringify(data))
}
)
}