Skip to content
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

Module/Codesplitting Issue with @angular-redux/form #46

Open
maplion opened this issue Oct 18, 2018 · 0 comments
Open

Module/Codesplitting Issue with @angular-redux/form #46

maplion opened this issue Oct 18, 2018 · 0 comments
Labels
enhancement New feature or request pkg: form Related to the form package

Comments

@maplion
Copy link

maplion commented Oct 18, 2018

I am currently using @angular-redux/form 9.0.1 and when I tried to modularize my application using a reducer registry, I was unable to avoid this error: Typeerror: cannot read property 'getstate' of undefined at rootstore._this.getstate (root-store.js:40) coming from @angular-redux/form when loading any component that had a form with [connect] that was inside of a lazy-loaded module.

I was able to make a workaround in the following form by removing the [connect] altogether and mimicking the behavior like this:

this.subscriptionToForm = this.form.valueChanges.subscribe(value => {
    this.myService.dispatchPayload('@@angular-redux/form/FORM_CHANGED', { path: myFormPath, value });
});

This seems to work fine and resolves my current issue, but I wanted to mention the issue as you move forward with development on these packages.

@smithad15 smithad15 added enhancement New feature or request pkg: form Related to the form package labels Jan 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request pkg: form Related to the form package
Development

No branches or pull requests

2 participants