Replies: 1 comment
-
Yes, with AngularFire you can persist data locally. You can use the enablePersistence() method in the constructor of your app.module.ts file to enable offline data persistence in AngularFire. When the device is offline, this will enable your app to access previously accessible data from the cache. Check out this link. "Offline persistence is an experimental feature that is supported only by the Chrome, Safari, and Firefox web browsers. If a user opens multiple browser tabs that point to the same Cloud Firestore database, and offline persistence is enabled, Cloud Firestore will work correctly only in the first tab." |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am trying to build an app that will mostly be used offline (only internet access is at home), the moment you go out in the field there is no internet access. The idea is that the user collects the data out in the field, and tonight when he is home the data sync with Firestore. This data can work with the cache method. (Meaning you have to first request the data while you have an internet connection before you can access it offline.)
However, the app has a second feature with information that should always be on the app. Meaning, the moment you install the app, the data from this specific collection should be downloaded to the device. And whenever you open the app with an internet connection the latest version of this collection should be stored on the device.
Can this be set with AngularFire?
(For reference I am building the App with Ionic + Capacitor + Angular.)
Beta Was this translation helpful? Give feedback.
All reactions