我正在尝试使用角元素8创建一些自定义元素,当在我的@ with ()上使用简单的对象作为字符串/数字时,它工作得很好。但是,当我想开始使用对象数组时,IE EDGE/11会抛出异常。
操作步骤
克隆回购(代码github回购)或执行以下操作:
TypeError: Unable to get property 'setInputValue' of undefined or null reference at listItems.set (http://localhost:4300/vendor.js:77430:35) at DefaultDomRenderer2.prototype.setProperty (http://localhost:4300/vendor.js:80310:9) at DebugRenderer2.prototype.setProperty (http://localhost:4300/vendor.js:76553:9) at setElementProperty (http://localhost:4300/vendor.js:73738:5) at checkAndUpdateElementValue (http://localhost:4300/vendor.js:73648:13) at checkAndUpdateElementInline (http://localhost:4300/vendor.js:73576:5) at checkAndUpdateNodeInline (http://localhost:4300/vendor.js:74992:13) at checkAndUpdateNode (http://localhost:4300/vendor.js:74935:9) at debugCheckAndUpdateNode (http://localhost:4300/vendor.js:75957:5) at debugCheckRenderNodeFn (http://localhost:4300/vendor.js:75935:13)"这是已知的缺陷还是我错过了一些重要的东西?
发布于 2019-11-27 16:16:09
这是角/元素的一个缺陷。当使用文档寄存器元素时,多边形填充不能可靠地调用构造函数。
若要修复问题,请切换到另一个用于自定义元素(如@webcomponents/定制-元素 )的填充
我为您的项目创建了一个分叉并修复了这个问题。
发布于 2020-05-18 17:12:44
不知怎的,我在一个设置中结束了,其中包含了两个填充:
import 'document-register-element';
import '@webcomponents/custom-elements';文件寄存器角元素,和一个(手册)添加的网页组件/自定义元素。这种组合导致了问题所指的确切问题。
(到目前为止)最终起作用的组合是:
import '@webcomponents/custom-elements/src/native-shim';
import '@webcomponents/custom-elements';发布于 2020-08-31 10:24:49
对于那些以我的身份来到这里的人,我也有:
import 'document-register-element';
import '@webcomponents/custom-elements';交换这两种进口产品为我做了一项工作:
import '@webcomponents/custom-elements';
import 'document-register-element';https://stackoverflow.com/questions/58834546
复制相似问题