angularfire: Please update the Documents ASAP , I'm not able to understand the new way properly

Version info

Angular: 13.00

Firebase: “firebase”: “^9.6.1”, AngularFire:@angular/fire”: “^7.2.0”, Other (e.g. Ionic/Cordova, Node, browser, operating system):

How to reproduce these conditions

Failing test unit, Stackblitz demonstrating the problem

Steps to set up and reproduce

Sample data and security rules

Debug output

** Errors in the JavaScript console **

** Output from firebase.database().enableLogging(true); **

** Screenshots **

Expected behavior

Actual behavior

About this issue

  • Original URL
  • State: open
  • Created 2 years ago
  • Reactions: 21
  • Comments: 16

Most upvoted comments

The current state of this library and the documentation is really annoying:

The angular schematic - which is the recommended and most common way to add this to angular projects - will setup everything for the new modular API. However the maintainers themselves say that the modular API is work in progress and that I quote:

This developer guide assumes you’re using the Compatibility API (@angular/fire/compat/*).

Even If we would like to use the new module API, it is clearly unfinished ; e.g. addDoc still uses promises instead of observables…

The fact, that the new API in this library uses 1:1 the same functions as upstream firebase JS sdk makes it error prone for imports (e.g. intellisense for importing collection will offer both import from firebase/firestore and @angular/fire/firestore) which is honestly a bit confusing for newbies.

Also, how should we work with custom document data types? As none of the new collection/document methods are generic, do we really need to specify custom converter for each collection? That is super annoying, compared to the compat way of just: this.afs.collection<Student>('students');

In order to use the compat API, you need to undo the changes done by the schematic, to import the regular Angular modules from the compat package, which is not mentioned anywhere.

Is there any high level project plan, when is both the migration of all APIs to RxJS and update of all documentation going to be finished?

I understand that the main audience for Firebase are the mobile app developers, but one does not expect this kind of issues and friction when integrating a product from Google.

Here guys see this it has all the basic code snippets for V9

https://dev.to/jdgamble555/angular-12-with-firebase-9-49a0

And I know most of the syntax now so you can ask me specifically

  1. Firestore
  2. Storage
  3. Authentication
  4. Cloud Messaging
  5. Remote Config

I can help you with these topics.

Agreed, The documentation is definitely old, just tried to look at Auth Guard docs and are all on v6

Just added the firestore collection docs. Check here #3174

@Sapython It’ a start!

That PR #3174 does not solve this firestore problem. But tomorrow I will publish the firestore documentation I will attach it to this.

@Sapython Thanks for the link! Could you push PR’s here with the updated documentation? [Update] Just saw one of your PRs, Thanks!

There’s not many documentation by third party sites, and the sample is really light for the changes (especially since I can no longer rely on intellisense).