如何使用Spring MVC / Angularjs查找用户在离线到Application或网上申请 [英] How to find user in Offline to Application or Online to application using Spring MVC/Angularjs

查看:209
本文介绍了如何使用Spring MVC / Angularjs查找用户在离线到Application或网上申请的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

一个传说说如果你无法解释给六十岁,你真的不明白自己,请有可能现在...
要寻找一个想法/参考如何做到这一点
亲爱的观众朋友/朋友,是新手了Spring MVC / angularjs。我想开发一种应用像登记表,其中的姓名,年龄,电话没有保存到数据库这里当用户处于离线(如果用户的wifi是关闭的),应该显示您可以在脱机的网页,如果用户保存了他的提交应显示项目本地保存按钮细节..
现在,当用户在网上(WiFi是ON)到previous离线输入的数据值,应用程序应该被保存到数据库中,并应尽量在服务器成功地保存的显示...
我们应该联机或脱机找到每一次的互联网连接与我们的应用。
附上我的示例场景图片

a legend said If you can't explain it to a six-year-old, you really don't understand it yourself please make it possible now... am looking for a idea/reference how to do this Dear Viewers/Friends, am newbie to spring mvc/angularjs. i want to develop one kind of application like registration form where name,age,phone no saving into database here when the user is in offline (if user wifi is off)it should display that you are in offline in page and if user saved his details by submitting the button it should be display items saved locally.. now when user in online (wifi is ON) to the application the previous entered data values in offline should be saved into database and should be display as saved succesfully in server... we should find each time internet connection online or offline with our application. am attaching my sample scenario image of

推荐答案

如果我来回答这个问题,按照问题的名号:

If i have to answer this question as per the question title then:


  1. 您可以使用在线 导航对象的方法。

  2. 会有检查与在线/离线的条件。

  3. 现在,你可以使用的localStorage 将数据设置为本地系统。

  4. 当用户进入离线然后将其保存到本地。

  5. 现在,如果系统被连接到互联网执行在线方法。

  6. 在线检查您可以使用AJAX将数据提交给服务器。

  7. 在服务器端,你必须使用你的逻辑将数据保存到特定的表。

  1. You can use online method of navigator object.
  2. There would be a condition to check with online/offline.
  3. Now you can use localStorage to set the data to the local system.
  4. When user goes offline then save it to local.
  5. Now if the system is connected to internet execute online method.
  6. in online check you can use ajax to submit the data to server.
  7. At serverside you have to use your logic to save the data to the specific tables.

这篇关于如何使用Spring MVC / Angularjs查找用户在离线到Application或网上申请的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆