Skip to content

Instantly share code, notes, and snippets.

@NyaGarcia
Last active June 17, 2022 10:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save NyaGarcia/5e7e372aa9ffa8812e3c7471ef4a4375 to your computer and use it in GitHub Desktop.
Save NyaGarcia/5e7e372aa9ffa8812e3c7471ef4a4375 to your computer and use it in GitHub Desktop.
import {
CollectionReference,
DocumentData,
collection,
} from '@firebase/firestore';
import { Firestore } from '@angular/fire/firestore';
import { Injectable } from '@angular/core';
@Injectable({
providedIn: 'root',
})
export class PokedexFirestoreService {
private pokemonCollection: CollectionReference<DocumentData>;
constructor(private readonly firestore: Firestore) {
this.pokemonCollection = collection(this.firestore, 'pokemon');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment