Reputation: 11
Auth Module.ts
I would like to replace the local storage with cookies, can it be done ?
import { localStorageSync } from 'ngrx-store-localstorage';
const localStorageRules = {
keys: [
{ auth: { deserialize: AuthState.deserialize } }
],
rehydrate: true,
storage: sessionStorage
};
export function localStorageSyncWrapper(reducer: any) {
return localStorageSync(localStorageRules)(reducer);
}
Upvotes: 1
Views: 933
Reputation: 920
you can install ngx-cookie-service
for cookie store or remove or get..
for more information about npm pakage ngx-cookie-service
Upvotes: 1