You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not entirely sure what you're asking. In the demo you should be able to select the cog icon on the right hand side of the toolbar, and there will be a dropdown for selecting the theme you'd like. It also does persist state using a combination of ngrx and localStorage.
Check out both:
app/core/local-storage
app/core/settings.
You can see where app state is being set. Once you've read and understood those files, take a look at these:
That line is importing the local storage meta-reducer and rehydrating the state for you.
There are a vew reasons why your data wouldn't persist:
You're opening the app inside of an incognito window, which would allow writing to localStorage but delete it as soon as the tab is closed.
You're using an older version of IE that doesn't allow access to localStorage.
Your cache is somehow being cleared every run. Make sure you don't have any extensions, etc, that clear cache.
If all else fails, delete and re-clone the repo.
There's an excellent article on state re-hydration using local storage here
An explanation on all of the different storage options for a browser can be found here
Hello,
Could you add a little code sample to show how to manually select the theme (such as to save it between sessions) ?
Thank you very much,
P.
The text was updated successfully, but these errors were encountered: