Before you get started, you must add the FirebaseTS library to your project. Follow this tutorial to learn how to add FirebaseTS.
Before you get started, you must add the FirebaseTS library to your project. Follow this tutorial to learn how to add FirebaseTS.
Once you have added FirebaseTS, you are set to go!
Incrementing and Decrementing Data
1. Import the FirebaseTSFirestore class.
import { FirebaseTSFirestore } from 'firebasets/firebasetsFirestore/firebaseTSFirestore';
2. Declare and initialize a FirebaseTSFirestore object.
3. Call the update() method to update a value that you want and then call the increment() method on the value.
To decrement the value, use a negative value.
this.firestore.increment(-2)