ngrx 4 + prod flag
See original GitHub issueI was able to integrate localstorage and it works when running with ng serve'. However, running the
ng build --prod` I get the following exception:
ERROR in Error encountered resolving symbol values statically. Only initialized variables and constants can be referenced because the value of this variable is needed by the template compiler
The way I add a localstoragesync is (app.module.ts):
StoreModule.forRoot(reducers , {
metaReducers: [
localStorageSync({keys: ['filter', 'auth']})
]
})
As soon as I remove metaReducers, it builds successfully
Issue Analytics
- State:
- Created 6 years ago
- Reactions:3
- Comments:7
Top Results From Across the Web
reducers are not called when using --prod flag #147 - GitHub
hello :) I try to migrate my ngrx store to v4 and I have an issue when using the --prod flag with ng...
Read more >How to write ngrx effects and reducers so that I can have ...
I am working on an Angular application using @ngrx/store and @ngrx/effects. The blogs I have been through all use flags like loading, ...
Read more >Angular state management made simple with NgRx
The NgRx Store is a Redux-inspired state management system that enables you to ... The -g flag will ensure that the Angular CLI...
Read more >Angular: NGRX a clean and clear introduction - Level Up Coding
The objective of this article is to provide a clean and clear introduction to ngrx. In order to accomplish this, I am going...
Read more >Chapter 15. Maintaining app state with ngrx - liveBook · Manning
A brief introduction to the Redux data flow; Maintaining your app state using the ngrx library; Exploring another implementation of the Mediator design ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@kevfuzz technically, this doesn’t need to be fixed.
use this following way to wrap
localStorageSync
and put it into an array formetaReducers
. You are good to go. (It works in AOT)@btroncone maybe we can put this in to the document?
Nice! Thank you @maxisam Closing this issue - It would definitely be useful to add this to docs for future reference