We had the same requirement in our application. Our solution made use of
sessionStorage as a local cache, which is supported for all the browser
versions we are targeting (including IE
8): http://caniuse.com/namevalue-storage
Pseudo code:
attempt a fetch from sessionStorage
If values are not in sessionStorage {
fetch values from server
add values to sessionStorage
}
continue processing
I even wrapped access to sessionStorage in an AngularJS service to make it
easier to work with.
Good luck with your solution!
Steve
On Friday, February 21, 2014 4:57:30 PM UTC-5, Luqman Rom wrote:
>
> Hi,
>
> I am learning AngularJs right now by making a very simple web apps just to
> familiarize myself with angularjs. I am having trouble on how can I keeping
> the state of scope after refreshing it?
>
> Thanks
>
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/groups/opt_out.