最近,我正在尝试将我的angular项目从8更新到9。在更新的同时,我还将wijmo从wijmo/wijmo更新到了@grapecity/wijmo包,因为它支持IVY。
但是在完成升级之后,我可以编译应用程序了,但是在运行时我得到了以下错误
global-error-handler.service.ts:43 Error: Uncaught (in promise): TypeError: (0 , t[n]) is not a function
TypeError: (0 , t[n]) is not a function
at backend.js:61
at Reflect.<anonymous> (backend.js:61)
at push../node_modules/@grapecity/wijmo.angular2.grid.detail/__ivy_ngcc__/index.js.__decorate (index.js:28)
at index.js:53
at Object../node_modules/@grapecity/wijmo.angular2.grid.detail/__ivy_ngcc__/index.js (index.js:53)
at __webpack_require__ (bootstrap:84)发布于 2020-11-05 00:59:29
我想了解有关此错误的更多信息。要快速检查的是属性初始化顺序。在Ivy中,属性按照在标记中指定的方式进行解释(以前由wijmo控制它们的解释方式)。因此,您可以通过在其他属性之前设置某些属性来中断组件。
例如,如果我试图在设置数据源之前设置组合框上的selectedIndex,那么应用程序将在运行时中断,因为列表中还没有要选择的项。
接下来要检查的是组件装饰器(如果您继承了我们的组件)。常春藤的装饰器有一些突破性的变化。
例如,您可能需要向ContentChildren查询添加{descendants: true}。
或者,您可能需要在类中添加一个@Injectable装饰器。
你可以在这里阅读更多关于破坏常春藤变化以及如何修复它们的内容:https://angular.io/guide/ivy-compatibility-examples
但请随时联系我们直接工作: wijmoexperts@grapecity.com
https://stackoverflow.com/questions/64675810
复制相似问题