Search code examples
angularfirebaseionic-frameworkrxjsangularfire2

Using AngularFireStore with ionic 3 (angular 5 + rxjs5)


I wanted to use angularfire2 to connect to firebase but I seem to be stuck in a dependency loop.

Ionic 3 officially supports up to angular 5, angularfire2 requires rxjs 6, angular 5 supports up to rxjs 5.

I can't upgrade to rxjs 6 since it isn't compatible with angular 5 and I can't upgrade to angular 6 since it isn't supported in ionic 3.

I was thinking of upgrading to ionic 4 since a lot of libraries break under my old angular version but I'm afraid ionic 4 beta will introduce even more bugs and my existing plugins my not be compatible.

Anyone got any idea what's the best course of action?


Solution

  • rxjs-compat should do the trick. Your concern about Ionic 4 is valid. I recently attempted the upgrade and found that:

    1. The guides and tutorials grossly undersell the jump from v3 to v4, both in terms of the conceptual jump (e.g. Angular components -> web components) and the time involved (e.g. moving from SASS variables to CSS variables and other CSS tweaks that are necessary can be a lot of work)

    2. Many plugins that I depend on are not yet compatible with v4 (in particular, Angular 7 and RxJS 6)

    Still, the time to do the upgrade is now, just see it as a side project that might take a bit of time and keep your v3 app running well alongside it.