-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
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
Error: TypeError: Cannot read property 'routeConfig' of undefined #191
Comments
I am also getting this error. The action emitted from ngrx/router-store does not have a |
@suhasdeshpande I figured it out. At least i think. First, i had to remove the CustomSerializer. After doing that my app was crashing deep inside the polyfills. But i had Edit
|
Let me try that. Thanks for information. :) |
IT works as expected. Nothing wrong with navigation. As @j-walker23 pointed out, CustomSerializer was filtering some important data. :) |
One thing to note here. |
DataPersistence, Custom Router Serializers, and NgRx should all play nice. |
Any updates on how this is coming? I am running into this issue now. |
Any update? |
Can someone provide a repro please? I'm having trouble understanding what the issue here is. And a repo would help. Thanks |
Note: See workaround below 🎉 Two different issues can arise when attempting to use
Issue 1 - CustomSerializer setup for @ngrx/router-store@j-walker23 points out that keeping Note: Issue 2 - storeFreeze metaReducerIt appears that SummaryEdit: This is not a bug with Neither of these issues are with By following @j-walker23's instruction to keep
Using Workaround: DataPersistence.navigation + router-state + DevToolsBy providing a
See here: https://ngrx.io/guide/store-devtools/config#serialize Note: no workaround for the StoreDevtoolsModule.instrument({
serialize: {
options: {
undefined: true, // same as serialilze: undefined,
},
replacer: (key, value) => {
if (value instanceof Router) {
return undefined;
}
if (
key === 'router' &&
typeof value !== 'undefined' &&
typeof value !== 'function'
) {
return {
url: value.state.url,
params: value.state.params,
queryParams: value.state.queryParams,
};
}
return value;
},
},
}), |
@jsonberry First of all, thanks so much for this workaround. It's a life saver. Just wanted to post a rather obvious fix to an issue I was having in case anyone is following this and got tripped up. Implementing the
This was fixed by altering the
|
Can this issue be closed or is there something remaining that needs to be documented? |
I have no objection on closing this. Github reminders are not very well understood by me. I always loss the issues I have opened or asked questions about. :D |
This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context. |
I am facing following issue on a very basic setup of ngrx store where I want to use navigation method provided by datapersistence lib. Any help would be greatly appreciated. @vsavkin This is the error I was talking about in our chat the other day. :) I am pretty sure I have made some configuration blunder. Thanks a lot for your time. This library simplifies lot of things and makes Angular super fun.
Router setup
Appmodule setup
Effect file where I am using data-persistence.navigation
The text was updated successfully, but these errors were encountered: