简体   繁体   English

带有Angularjs的脱机webapp

[英]Offline webapp with Angularjs

Im creating a Angular Webapp, I need the application to work offline (most of the functionality). 我在创建Angular Webapp时,需要该应用程序脱机工作(大多数功能)。 According to me almost all the data is required to use the app offline, 据我说,离线使用该应用程序几乎需要所有数据,

  1. Angular JS files Angular JS文件
  2. Images 图片
  3. Css files CSS文件

I read about IndexedDB, it shows we can store the data in object form (key/value pairs). 我读了有关IndexedDB的文章,它表明我们可以以对象形式(键/值对)存储数据。 How can i store all my other resources listed above ? 我如何存储上面列出的所有其他资源? Is there any better way to store offline data (local storage also gives only 5mb of storage). 有没有更好的方法来存储脱机数据(本地存储也仅提供5mb的存储空间)。

Also read of cache manifest files , but seems thats not a very good way to store larger data. 还读取了缓存清单文件,但似乎那不是存储较大数据的一种很好的方法。

Sounds like you need to look into manifest files instead of things like localForage. 听起来您需要查看清单文件,而不是诸如localForage之类的文件。 This way the browser will do all the CSS/HTML/JS bit for you. 这样,浏览器将为您完成所有CSS / HTML / JS位。

See http://diveintohtml5.info/offline.html . 参见http://diveintohtml5.info/offline.html

If you want to do full synchronisation of database like data you will have a lot more work in store for you though you can take a look at my library / bootstrap for this at https://github.com/forbesmyester/SyncItBootstrap 如果您想完全同步数据之类的数据库,尽管您可以在https://github.com/forbesmyester/SyncItBootstrap上查看我的库/引导程序,但您还有很多工作要做

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

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