Hi Cesar,

How large is the data? if its up to a few Kb, localStorage 
<https://developer.mozilla.org/nl/docs/DOM/Storage>is the the easiest way 
to work with.

You can do something like:

    function Colorstore() {
        var st = window.localStorage; //reference for easy access.
        this.color = st.colorStore || 'teal';
        this.save = function (newColor) {
            st.colorStore = newColor;
            this.color = newColor;
        };
    }

    angular.module('sampleColorstore')
        .service('Colorstore', Colorstore)

This is a (overly) simplified (but still working) version, but it should 
get you going.
If you have any more questions, don’t hesitate to ask!

Regards
Sander
​

-- 
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/d/optout.

Reply via email to