【发布时间】:2018-06-07 04:44:03
【问题描述】:
我正在使用 Angular 5 使用 ng-formly 库创建表单,但我遇到了下面的这个错误。我在网上使用了他们的示例,但在我的项目中使用时,无法理解为什么他们的核心项目中存在问题。
OrderComponent.html:33 ERROR TypeError: Cannot add property model, object is not extensible
at eval (ngx-formly-core.js:90)
at Array.forEach (<anonymous>)
at assignModelToFields (ngx-formly-core.js:86)
at FormlyFormBuilder.buildForm (ngx-formly-core.js:503)
at FormlyForm.ngOnChanges (ngx-formly-core.js:825)
at checkAndUpdateDirectiveInline (core.js:12407)
at checkAndUpdateNodeInline (core.js:13935)
at checkAndUpdateNode (core.js:13878)
at debugCheckAndUpdateNode (core.js:14771)
at debugCheckDirectivesFn (core.js:14712)
知道为什么我会收到此错误消息吗?
【问题讨论】:
-
您能否将代码添加到指出错误的问题中?
-
OrderComponent.html中出现错误。请提供其代码。
标签: angular angular-forms angular-formly