TypeError:element.getBoundingClientRect不是服务器端渲染Angular 5中的函数

时间:2018-04-04 12:06:49

标签: angular ngx-datatable

我使用" @ swimlane / ngx-datatable"在服务器端渲染中出现此错误。我遵循这个link但不行,我在root.module.server.ts中提供以下两个服务,并尝试使用数据表的哪个独立模块。

在浏览器上运行时,一切都很好。任何人都知道如何解决这个问题。谢谢。

ERROR TypeError: element.getBoundingClientRect is not a function
    at DimensionsHelper.getDimensions (E:\ecap3\ecap3-webclient-selectnetwork\dist\server.js:233933:24)    at DatatableComponent.recalculateDims (E:\ecap3\ecap3-webclient-selectnetwork\dist\server.js:254801:42)
    at DatatableComponent.recalculate (E:\ecap3\ecap3-webclient-selectnetwork\dist\server.js:254764:14)    at DatatableComponent.set [as rows] (E:\ecap3\ecap3-webclient-selectnetwork\dist\server.js:254406:18)
    at updateProp (E:\ecap3\ecap3-webclient-selectnetwork\dist\server.js:12921:37)
    at checkAndUpdateDirectiveDynamic (E:\ecap3\ecap3-webclient-selectnetwork\dist\server.js:12692:23)
    at checkAndUpdateNodeDynamic (E:\ecap3\ecap3-webclient-selectnetwork\dist\server.js:14220:20)
    at checkAndUpdateNode (E:\ecap3\ecap3-webclient-selectnetwork\dist\server.js:14144:16)
    at prodCheckAndUpdateNode (E:\ecap3\ecap3-webclient-selectnetwork\dist\server.js:14865:5)
    at Object.updateDirectives (E:\ecap3\ecap3-webclient-selectnetwork\dist\server.js:285222:53720)

0 个答案:

没有答案