@grapecity/wijmo在将我的Angular项目从8升级到9后抛出运行时错误



最近我试图将我的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)

我想了解有关此错误的更多信息。快速检查的是属性初始化顺序。在Ivy中,属性被解释为在标记中指定的属性(以前wijmo控制它们的解释方式(。因此,可以先设置某些特性,然后再设置其他特性,从而打断零部件。

例如,如果在设置数据源之前,我试图在组合框上设置selectedIndex,那么应用程序在运行时会中断,因为列表中还没有可供选择的项目。

更多信息请点击此处:https://www.grapecity.com/wijmo/docs/GettingStarted/Angular-Components#property-初始化顺序-角-9-vy-和更高

接下来要检查的是组件装饰器(如果您继承了我们的组件(。Ivy的装饰师有一些突破性的变化。

例如,您可能需要将{descendants: true}添加到ContentChildren查询中。

或者,您可能需要向类中添加一个@Injectable装饰器。

你可以在这里阅读更多关于打破Ivy中的变化以及如何修复它们的信息:https://angular.io/guide/ivy-compatibility-examples

但请随时联系我们直接工作:wijmoexperts@grapecity.com

相关内容

最新更新