i am trying to receive firebase data inside my ionic app.
the .ts file is as follows
import { Component } from '@angular/core';
import { IonicPage, NavController, NavParams } from 'ionic-angular';
import { AngularFireDatabase } from 'angularfire2/database';
import { AddCommentPage } from '../add-comment/add-comment';
import { Review } from '../../models/review.interface';
@IonicPage()
@Component({
selector: 'page-testimonals',
templateUrl: 'testimonals.html',
})
export class TestimonalsPage {
private ref = this.database.list<Review>('reviews');
constructor(public database: AngularFireDatabase ,public navCtrl: NavController, public navParams: NavParams) {
this.ref.snapshotChanges().subscribe(console.log);
}
newComment(){
this.navCtrl.push(AddCommentPage);
}
}
my installed dependencies are
{
"name": "app",
"version": "0.0.1",
"author": "Ionic Framework",
"homepage": "http://ionicframework.com/",
"private": true,
"scripts": {
"clean": "ionic-app-scripts clean",
"build": "ionic-app-scripts build",
"lint": "ionic-app-scripts lint",
"ionic:build": "ionic-app-scripts build",
"ionic:serve": "ionic-app-scripts serve"
},
"dependencies": {
"@angular/animations": "5.2.11",
"@angular/common": "5.2.11",
"@angular/compiler": "5.2.11",
"@angular/compiler-cli": "5.2.11",
"@angular/core": "5.2.11",
"@angular/forms": "5.2.11",
"@angular/http": "5.2.11",
"@angular/platform-browser": "5.2.11",
"@angular/platform-browser-dynamic": "5.2.11",
"@ionic-native/core": "4.7.0",
"@ionic-native/in-app-browser": "^4.8.0",
"@ionic-native/splash-screen": "4.7.0",
"@ionic-native/status-bar": "4.7.0",
"@ionic/storage": "2.1.3",
"angularfire2": "^5.0.0-rc.11",
"cordova-android": "7.0.0",
"cordova-plugin-device": "^2.0.2",
"cordova-plugin-inappbrowser": "^3.0.0",
"cordova-plugin-ionic-keyboard": "^2.0.5",
"cordova-plugin-ionic-webview": "^1.1.19",
"cordova-plugin-splashscreen": "^5.0.2",
"cordova-plugin-whitelist": "^1.3.3",
"firebase": "^5.2.0",
"ionic-angular": "3.9.2",
"ionicons": "3.0.0",
"rxjs": "^5.5.11",
"sw-toolbox": "3.6.0",
"zone.js": "0.8.26"
},
"devDependencies": {
"@ionic/app-scripts": "3.1.10",
"typescript": "~2.6.2"
},
"description": "An Ionic project",
"cordova": {
"plugins": {
"cordova-plugin-whitelist": {},
"cordova-plugin-device": {},
"cordova-plugin-splashscreen": {},
"cordova-plugin-ionic-webview": {},
"cordova-plugin-ionic-keyboard": {},
"cordova-plugin-inappbrowser": {}
},
"platforms": [
"android"
]
}
}
Please help me,
Its showing the above errors.