We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello. I spend about half of day and still can't get positive result. State data is not saved after reload. Please provide normal example of usage.
I already tried:
The text was updated successfully, but these errors were encountered:
Came up with this, seems to work
export function stateSetter(reducer: ActionReducer<any>): ActionReducer<any> { return function (state: any, action: any) { const NGRX_STATE = '___NGRX_STATE___'; const newState = reducer(state, action); if (action.type !== '@ngrx/store/init') { return window[NGRX_STATE] = newState; } else { if (window[NGRX_STATE]) { return window[NGRX_STATE]; } return newState; } }; } export const metaReducers: MetaReducer<State>[] = !environment.production ? [storeFreeze, stateSetter] : [];
Sorry, something went wrong.
No branches or pull requests
Hello. I spend about half of day and still can't get positive result. State data is not saved after reload. Please provide normal example of usage.
I already tried:
The text was updated successfully, but these errors were encountered: