我有一个与angularjs有关的问题。 [英] I have a single question related to angularjs.

查看:88
本文介绍了我有一个与angularjs有关的问题。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是angularjs的新手,目前正在开发一个angularjs项目,其中有一个仪表板,我在其上加载了具有特定日期范围选择数据的HighCharts。





我要实现的是当该图表一旦加载了数据,然后我导航到另一个页面并返回到同一个仪表板页面,它应该加载相同的数据就像之前我离开那个页面一样。





是否有任何建议如何使用angular来实现这个场景,有没有具体的方法可做这个?



感谢adv。



我是什么尝试过:



因为我认为它可以在页面的加载时间完成,但我不知道它将如何使用angularjs实现。

i am new for angularjs and currently working on a angularjs-project, in which there is a Dashboard on which i am loading HighCharts with data on Specific date-range selection.


the thing i wants to implement is when that chart once loaded with data, and i navigate to another page and get back to the same dashboard page, it should be loaded with the same data as before i left that page.


is there any suggestion how to achieve this scenario using angular, is there any specific way to do this?

thanks in adv.

What I have tried:

as i think it can be done on-loading time of the page, but i don't have any idea how it will be implemented using angularjs.

推荐答案

您可以使用LocalStorage来保存highcharts的数据,只需将配置与数据存储在本地存储上并检索它导航回页面时再次使用特定ID。
You can use LocalStorage to persist the data of highcharts, just store the configuration with data on the local storage and retrieve it again with specific id when you navigate back to the page.


这篇关于我有一个与angularjs有关的问题。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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