我创建了一个带有表单的 Ionic 应用程序。没什么特别的(代码如下)。在我添加表单并使用表单组和其他东西之前,它工作得很好。当我开始添加表单组和所有连接的东西时,我收到此错误:
\n\n\n\n\ncore.js:6260 错误错误:未捕获(承诺中):错误:NodeInjector:\n NOT_FOUND [ControlContainer] 错误:NodeInjector: NOT_FOUND\n [ControlContainer]\n 位于 getOrCreateInjectable (core.js:5894)\n 模块处。 \xc9\xb5\xc9\xb5directiveInject (core.js:21115)\n 在 NodeInjectorFactory.NgControlStatusGroup_Factory [作为工厂] (forms.js:1073)\n 在 getNodeInjectable (core.js:6025)\n 在 instantiateAllDirectives (core. js:12953)\n 在 createDirectivesInstances (core.js:12169)\n 在 \xc9\xb5\xc9\xb5elementStart (core.js:21298)\n 在 EditPage_Template (template.html:18)\n 在executeTemplate (core) .js:12129)\ n在renderView(core.js:11899)\ n在resolvePromise(zone-evergreen.js:798)\ n在resolvePromise(zone-evergreen.js:750)\ n在zone-evergreen.js :860\n 在 ZoneDelegate.invokeTask (zone-evergreen.js:399)\n 在 Object.onInvokeTask (core.js:41640)\n 在 ZoneDelegate.invokeTask (zone-evergreen.js:398)\n 在区域。 runTask (zone-evergreen.js:167)\n 在rainMicroTaskQueue (zone-evergreen.js:569)
\n
我尝试了在网上找到的东西:\n从文件 app.module.ts 中的 @angular/forms 导入 Forms Module 和 ReactiveFormsModule
\n\n这对我不起作用,并且我不断收到错误。
\n\n我在 SO 上找到并尝试过的链接,但没有成功:
\n\n