I'm working with the ionic-framework version 2
and typescript
.
Last week I integrated Firebase in my app, which worked fine. Now I want to integrate geofire too, but I can't initialize an instance of a geofire object.
My MainSearchPage class:
import { Component, Inject } from '@angular/core';
import { AngularFire, FirebaseListObservable, FirebaseApp } from 'angularfire2';
import { GeoFire } from 'geofire';
constructor(public af: AngularFire, @Inject(FirebaseApp) firebaseApp: firebase.app.App) {
var firebaseRef = firebaseApp.database().ref();
var geofire = new GeoFire(firebaseRef);
}
But I always get the following error:
Error in ./MainSearchPage class MainSearchPage_Host - caused by: WEBPACK_IMPORTED_MODULE_7_geofire.GeoFire is not a constructor
Versions:
ionic-app-script 1.3.1,
typescript 2.0.6,
firebase 3.7.5,
angularfire 2.0.0-beta.8,
geofire 4.1.2,
I would appreciate any help.