![](/img/trans.png)
[英]Go back to previous page without refreshing using jquery, not angularjs
[英]Go to previous html page without refreshing the data
我使用html页面的onLoad函数从服务器获取数据并使用angularJS ng-repeat更新表行。 每当我转到另一个html页面并返回时,onload函数正在执行并导致延迟。 我需要返回上一个html页面而不刷新数据。
你有几个选择 - 最好的选择是在window.sessionStorage
存储一个标志,并存储数据。
请注意, sessionStorage
对于每个窗口/选项卡都是唯一的,并且是临时的,与localStorage
不同,后者更长期。
您甚至可以设置时间/日期戳,以确定数据在被视为过时且需要刷新之前可以获得的时间。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.