Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

179
Visualizações
Confused by angular firestore possibilities

Can someone please enlighten me as I can't get the grasp on what this is all about using Angular and Firestore.

Started using Google Firebase and tried to implement CRUD using Firestore.

What is the difference between this library.

import { Firestore } from '@angular/fire/firestore'
...
this.coll = collection(this.firestore, 'user-services');

collectionData(this.coll, {
    idField: 'id'
  }).pipe(shareReplay({ bufferSize: 1, refCount: true }))...

And the other firestore library used in the git repository in the documentation.. (https://github.com/angular/angularfire/blob/bea9d6774ce455d50363f9844ea48c32d6c37eb6/docs/firestore/collections.md)

import { AngularFirestore, AngularFirestoreDocument } from '@angular/fire/compat/firestore';

I think this is really weird that there is no straight line on which to use, if I try to use them both the first one stops working..

Can someone explain to me what's happening under the hood or provide some history / usage guide which one is newest / safest to use?

Kind regards!

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

They changed a lot in version 9 so they provided a compatibility layer "@angular/fire/compat/firestore" to allow a smoother migration coming from firebase 8.

The import "@angular/fire/firestore" is the new tree shakeable version for a smaller bundle size.

In your case if it's brand new project you should not use the compatibility layer.

You can read more here https://firebase.google.com/docs/web/modular-upgrade

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda