feat: enable data retention for ngrx store slices #720
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR Type
[x] Feature
What Is the Current Behavior?
Data for
recently
orcompare
does not persist beyond the application lifetime, which even ends after a page refresh. This makes it hard to customize these features, as theng serve
also resets the store on every save.It is possible to persist the data with
localStorageSaveMeta
, but this meta reducer does not save the data in accordance with the deploy baseHref, which basically breaks this feature in a multi-channel deployment with context path support.What Is the New Behavior?
Stores for
recently
,compare
andtacton
can be saved to session or local storage respecting the scope given by the baseHref. No new defaults are configured with this PR, the application will behave like previously. It is now possible for project customizations to enable data persistence for these stores. The configuration can be supplied as compile time property inenvironment.ts
files.Does this PR Introduce a Breaking Change?
[ ] Yes
[x] No
Other Information