I have a SPA (single page app). I am trying to keep data of one route, when 
moving to another, so if a person returns to the route, he'll see it in 
exactly the same state he left it.

In example, I have an inbox page (e.g. #/inbox).
On this page, a person can see his inbox, and gets new messages to the 
inbox when he stays on this page.  Unread emails are in bold, read emails 
are normal and they are sorted and filtered in a certain manner the user 
has chosen. 
The app gets one "push" of emails from the server, and then updates when it 
runs.
It works fine.

The problem arises when this person "navigates" away from the inbox "page".
The navigation is from #/inbox to #/other-page - each has its own 
controller and view.

After the person navigates away, and then comes back to the page, the page 
resets - e.g. the inbox starts from scratch, there are no unread emails in 
bold, filters are reset etc.
I followed instructions given me here, to keep the data in a service, but 
when I get back to #/inbox, the service resets and I lost the data.

How do I keep such data, so the person would see the same inbox page after 
navigating the rest of the SPA? 
Or is there a smarter way than just rebuilding the page with saved data?

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.

Reply via email to