Angular - v13.1 Firebase - ^9.6.2
In the old version of firebase, it was possible to import firebase into an Angular component to utilise the serverTimestamp
property:
import firebase from 'firebase/app';
import 'firebase/firestore';
---
this.afs.doc(`${db_path}`).set({
dateCreated: firebase.firestore.FieldValue.serverTimestamp(),
)};
However, since being on the new version, this approach no longer seems to work. Looking through the documentation, I haven't (...yet) found anything that suggests an alternate way to import firebase into a component to use this value.
Is there a better approach to utilise the timestamp type to set as a value?