question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

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

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:18
  • Comments:14

github_iconTop GitHub Comments

24reactions
yntelectualcommented, Apr 2, 2022

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.

6reactions
Sapythoncommented, Mar 9, 2022

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

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

17 Less Pushy Alternatives to "As Soon As Possible"
Here are synonyms for politely communicating urgency without writing "ASAP" or "as soon as possible."
Read more >
Updates for ASAP Members about Work Permit Advocacy
ASAP is now working with this new group to create a document with recommendations for how the government can change the laws about...
Read more >
Useful Phrases
Note that often phrases that begin “Can you …” or “Could you …” are not considered questions when they are simply a polite...
Read more >
How to Send Better Email: Try These Ready-to-use Templates ...
An overview of the snippets and samples of emails we love, and what we can take away from them to learn how to...
Read more >
10 alternatives to communicate a sense of urgency without ...
It helps them stay on top of their workload and shows you're not randomly ... For instance, you might write, “Please submit your...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found