简体   繁体   English

如何在本地保存羊驼json文件

[英]How to save alpaca json file locally

I'm a newbie so please be peaceful. 我是新手,所以请保持和平。 I have managed to write a small app with phonegap using the alpacajs form framework. 我已经设法使用alpacajs表单框架用phonegap编写了一个小型应用程序。

I would love to save the forms locally in the app and I really fail to do so. 我很想将表单保存在应用程序本地,但我确实没有这么做。 Right now I have managed to put all the schema and form stuff in files like form.json and schema.json read them and use them. 现在,我设法将所有架构和表单内容放入诸如form.json和schema.json之类的文件中,以读取并使用它们。

Is there a really simple way to do so with a javascript app using phonegap while being offline. 使用离线状态下使用phonegap的javascript应用程序,有没有一种真正简单的方法。 Meaning to store the stuff locally on an tablet or smartphone? 是否打算将内容本地存储在平板电脑或智能手机上? The information should be saved even when you restart the tablet/phone and/or the app. 即使重新启动平板电脑/手机和/或应用程序,也应保存该信息。

Any ideas how to achieve that? 有什么想法要实现吗? Thanks a lot. 非常感谢。

You could save the JSON data into an sqllite database on the device 您可以将JSON数据保存到设备上的sqllite数据库中

The below link about the local storage options: 以下有关本地存储选项的链接:

https://cordova.apache.org/docs/en/latest/cordova/storage/storage.html#plugin-based-options https://cordova.apache.org/docs/zh-CN/latest/cordova/storage/storage.html#plugin-based-options

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM