How about using the unload event? Raul
Sent from my iPad > On May 13, 2014, at 6:59 AM, Toni Vartiainen <[email protected]> wrote: > > Hello, > > I have an somewhat large JSON-object stringified in a LocalStorage. At the > moment every time I need to alter this JSON-object in my app I first read it > from LocalStorage and then immediately write it back. > Im seeking a way to read this JSON-object from LocalStorage just once during > my app init and not write it back until the app is to be shutdown. > > Is it possible to implement some kind of destructor function for objects in > Angular? > > - Toni > -- > 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. -- 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.
