-
Notifications
You must be signed in to change notification 8000 settings - Fork 15
Does not work with reactive forms. Only works with template forms #22
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
Comments
The problem occurs because It can be trivially fixed by splitting the
I recommend using a base class to implement the common logic. |
Is a fix planned? Thanks for the hard work on |
Can you provide an example of this selector (form[connect][formGroup]) being used in the html? |
In template driven world that's easy: |
Have you managed to implement the "For reactive forms " solution posted above by @frederikaalund ? |
Nope, I haven't tried. We switched to template-driven for the moment. |
I'd like to add that my fix is not a work-around. Is is one possible way to fix angular-redux/form itself. |
Ok cool, thanks for the clarification. Will wait for the fix. |
@frederikaalund Why don't you send a PR!? 👍 |
@JohannesHoppe I would normally but I don't actually use @angular-redux/forms. I don't have a setup where I can quickly test my fix. Was a Plunker of the issue ever posted? That would make it a lot easier. I actually use my own simple store directive that is bi-directional (changes from the store also goes into the form). I ran into exactly the same issue as posted here while implementing my own directive. I just noticed that my fix also could be applied to @angular-redux/forms. |
I took a shot at this but in trying to run the tests I now get this error.
Not sure how to resolve. Update....I get this same error with the based forked repo as well. |
Ok have this working locally (minus the test still for some reason). Have it broken apart and template approach is all working. However, I can't get reactive to work still as I get this error. Pretty sure this has to do with it not finding the form to get it set up. My HTML looks like this. I have tried this: That gets me past the constructor error but then, of course, angular errors because it can't bind its validators. Can anyone point out what I am missing? Update: |
PR has been submitted. Hopefully the group can review soon. |
This library seems to have been abandoned so I am just removing the forms module from my code. |
Sad to hear that is the official word. I sort of came to the same conclusion when I first found this project. A redux-form module is really needed. Anyhow, thanks for all the effort that you put into fixing this issue! |
I've been planning to revamp this as part of our 7.0 roadmap - so maybe this is an opportunity in disguise. I'd like to collect some feedback on what people would be looking for in a reworked forms module. In the meantime, I can get that pr merged as part of the 6.4 series as long as the breaking API change comment is resolved. Then let's collect some community reqs (and maybe some help? :) ) and do it better for 7. |
Great news! Should we just post our requirements here or do you plan to create a "feature requests" issue? |
Give @angular-redux/form@6.5.0 a whirl and let me know. |
As for the feature list, feel free to start an issue for now. We'll formalize a release out of it. One item is toolchain - it needs simplifying and the unit tests need fixing. |
This is a...
What toolchain are you using for transpilation/bundling?
ngc
Environment
NodeJS Version: 6
Typescript Version: 2.2
Angular Version: 4
@angular-redux/store version: 6.2.0
Expected Behaviour:
I thought this would work with both reactive and template driven forms. When I set it up via a template driven forms it works. But when I try and add a reactive form to the page I get an error about "no provider for ngForms".
Is this going to/should support reactive forms?
Instead of the template approach found in the sample app (feedback form).
Actual Behaviour:
Returns
ERROR Error: Uncaught (in promise): Error: No provider for NgForm!
The text was updated successfully, but these errors were encountered: