I am developing an application using an ionic structure and it will extract some data from the API that was created using laravel, store it in the database, so when the user is offline, he can continue to use the application, I did a bit of research in Internet and found a plugin called pouchDB, is it recommended to me what I need? What is the best way to do this?
PouchDb is convinced that this is a good solution for synchronizing data with your application. But depending on what you need to do, you can choose between several PaaS that provide natural data synchronization and stand-alone capabilities (along with many other features such as oAuth2 authentication and push notification).
I have worked with several, I can offer:
All of these platforms provide customers with the ability to work with all native mobile environments and javascript.
Depending on the amount of data you want to cache, you can save it in local storage.
The logic will be like this:
.success
.error
$scope
Thus, if your requests are successful (the device has the Internet and the API is functional), the data is saved. Otherwise, the requests will not work (there is no Internet or for another reason), use the saved data.
An example of this can be seen here:
https://blog.nraboy.com/2014/06/saving-data-with-ionicframework/
However, as mentioned in the previous answer, PouchDB is a great option if you have a CouchDB database installed. Here are some tutorials for synchronizing solutions:
https://blog.nraboy.com/2014/12/syncing-data-firebase-using-ionic-framework/ http://devgirl.org/2014/12/30/sync-data-using-pouchdb-in- your-ionic-framework-app /
Hello,
Source: https://habr.com/ru/post/982748/More articles:Pycharm 4.0.4 cannot run the file, instead displays "Run Doctests" in the context menu - pythonJS corner promise in app.run () - javascripthttps://translate.googleusercontent.com/translate_c?depth=1&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/982745/windows-10-toast-notifications-desktop-application&usg=ALkJrhhZX1cnbNHyB1-V_Fp3hBlUAq2mtwSafely keep client secret - androidsend / receive data via bluetooth - androidFilling a VBA array with a list of values ββin native code - vbaTime in Joda Time in Cassandra Date - spring-dataReverse engineer optimized c code from assembly - cHow to use conditions inside an email template in SugarCRM - phpChecking CMake Cache Variable in Toolchain File - cmakeAll Articles