Closed lemind closed 8 years ago
Hmm! Thank you lemond. I will look today
This was fixed in https://github.com/clbond/ng2-redux-form/commit/c4cd3049d01416e7c1ef884dc1088efe6c7e1145. My apologies!
Thanks. That fixed it for me. I updated to 1.0.15 and now I have this error in the browser when running the example:
core.umd.js:6001Error: Uncaught (in promise): TypeError: container.registerControl is not a function
at resolvePromise (http://localhost:8080/main.js:18347:33)
at http://localhost:8080/main.js:18383:19
at ZoneDelegate.invokeTask (http://localhost:8080/main.js:18154:39)
at Object.onInvokeTask (http://localhost:8080/main.js:46540:46)
at ZoneDelegate.invokeTask (http://localhost:8080/main.js:18153:44)
at Zone.runTask (http://localhost:8080/main.js:18054:49)
at drainMicroTaskQueue (http://localhost:8080/main.js:18286:37)
My fork
@dancancro Thank you for this bug report. I believe it is addressed by https://github.com/clbond/ng2-redux-form/commit/228f748828a9f03a7d65d0cc3ad215546f3377df. I added your 'nested array' code to the main example as well. Thank you!
@clbond Hello. I have another one. It was when I try to run angular2-redux-example with ng2-redux-form
Take the exclude: /node_modules/
out from your webpack/loaders.js
@clbond It has solved issue. But I should change it every time. Could be another way how I can fix it permanently?
And anyway I have another error.
Upgrade your rxjs
package to 5.0.0-beta.12
I'm not sure this is related. I updated ng2-redux-form, added it to my project and I am getting this error. I hadn't tested ng2-redux-form yet in my project before so I'm still open to suspects. It could be this issue which was closed for being stale, but I don't know.
zone.js?fad3:484 Unhandled Promise rejection: Template parse errors:
No provider for ControlContainer ("[ERROR ->]<form connect="list">
<div class="heading">
<div class="row">
"): ListPage@0:0 ; Zone: <root> ; Task: Promise.then ; Value: Error: Template parse errors:(…) Error: Template parse errors:
No provider for ControlContainer ("[ERROR ->]<form connect="list">
<div class="heading">
<div class="row">
"): ListPage@0:0
at TemplateParser.parse (eval at <anonymous> (http://localhost:8080/app.js:1045:1), <anonymous>:133:19)
at RuntimeCompiler._compileTemplate (eval at <anonymous> (http://localhost:8080/app.js:3012:1), <anonymous>:244:51)
at eval (eval at <anonymous> (http://localhost:8080/app.js:3012:1), <anonymous>:167:83)
at Set.forEach (native)
at compile (eval at <anonymous> (http://localhost:8080/app.js:3012:1), <anonymous>:167:47)
at ZoneDelegate.invoke (eval at <anonymous> (http://localhost:8080/polyfills.js:4397:1), <anonymous>:332:29)
at Zone.run (eval at <anonymous> (http://localhost:8080/polyfills.js:4397:1), <anonymous>:225:44)
at eval (eval at <anonymous> (http://localhost:8080/polyfills.js:4397:1), <anonymous>:591:58)
at ZoneDelegate.invokeTask (eval at <anonymous> (http://localhost:8080/polyfills.js:4397:1), <anonymous>:365:38)
at Zone.runTask (eval at <anonymous> (http://localhost:8080/polyfills.js:4397:1), <anonymous>:265:48)
Looks like something you might see if FormsModule
and ReactiveFormsModule
were not imported into your @NgModule
.
That was it. Very well done. Thanks!
No problem! I am happy to see people trying out the library. I would love any feedback you can provide about what works and what doesn't; what's clear and what isn't; etc. Also, thank you for your code contribution Dan (the nested array)!
Well, since you asked....
I'm having the ControlContainer problem again but in a different place. Before it was complaining about this spot of list.page.html. Now it is complaining about this line of objection.component.html which is used in list.page.html.
Unhandled Promise rejection: Template parse errors:
No provider for ControlContainer ("t()">
<template connectArray let-rebuttal connectArrayOf="objection.rebuttals">
[ERROR ->]<li [ngModelGroup]="rebuttal" [ngClass]="{touched: rebuttal.touched}">
<list-rebuttal
"): ObjectionComponent@13:10 ; Zone: <root> ; Task: Promise.then ; Value: Error: Template parse errors:(…) Error: Template parse errors:
No provider for ControlContainer ("t()">
<template connectArray let-rebuttal connectArrayOf="objection.rebuttals">
[ERROR ->]<li [ngModelGroup]="rebuttal" [ngClass]="{touched: rebuttal.touched}">
<list-rebuttal
"): ObjectionComponent@13:10
I added the missing FormsModule import to list.module.ts which is imported into app.module.ts
The page is structured as
list.page.html
<form connect="list$ | async">
<list-objection>'s // objection.component.html
<list-rebuttal>'s // rebuttal.component.html
</form>
@dancancro There are lots of problems with your code. First off you are not importing ng2-redux-form or adding it to your module imports
list anywhere. So the library is not even being included in the application bundle. Secondly you are not using template-driven forms; your components expect to be given actual objects. Your components should ultimately produce a <form>
tag that matches the shape of your Redux state - but your code doesn't do this. Unfortunately I don't have the time to debug and fix the code in your repository.
Hi Chris. I abandoned that project after being stuck for too long. Now I'm onto this ngrx one in which I thought about using your library for my version of the Tour of Heroes contacts page. Thank you for clarifying that it won't work. Welcome back!
I set up npm package but I see few errors about this package
And some issue is with setting of package because of I can't import it.