Ionic 3 with angularfire2 doesn't seem to work


#1

I’ve been at this for a few hours now. Generating new projects to test out different versions of angularfire2 as well as searching online for different solutions.

Is there not a way to get Ionic 3.x.x to work with the latest version of AngularFire2?


#2

I haven’t tried with rc9 yet, but I’ve got an earlier release of v5 working fine. Firebase issued a couple patches recently, so you might be running into something there. If you want better help, you need to provide specifics. Your ionic info, package.json, and the text of the error you’re running into.


#3

Thanks Aaron,

Digging a bit further, I’ve noticed all to late that AngularFire2 has an ionic starter kit provided.

for anyone else having the same issue you can start up that project by using

ionic start auth-ng4-ionic3-af2 blank

which installs specific versions that work.

Thanks again Aaron for your insight.


#4

I’m using:

    "angularfire2": "^5.0.0-rc.6.0",
    "firebase": "^4.13.1",
    "promise-polyfill": "^7.1.2",
    "ionic-angular": "^3.9.2",

And:

export class CoreModule {
  constructor( @Optional() @SkipSelf() parentModule: CoreModule,
               private translate: TranslateService,
               private afs: AngularFirestore) {

    throwIfAlreadyLoaded(parentModule, 'CoreModule');
 
    ...

    // https://github.com/angular/angularfire2/issues/1575
    const settings = { timestampsInSnapshots: true };
    afs.app.firestore().settings(settings);
  }
}