首页 > 解决方案 > 无法绑定到“行”,因为它不是“ngx-datatable”的已知属性

问题描述

我点击了这个链接,但是无论我在哪里添加 NgxDatatableModule,我都得到了这个。

以下是我已经尝试过的标准。

添加到app.module.ts不工作

然后添加到shared.module不起作用

然后page.module 没有工作

所有的时间只是得到

Can't bind to 'rows' since it isn't a known property of 'ngx-datatable'.

有趣的部分是之前ngx-datatable,我安装ngx-bootstrap了 ngx-bootstrap 属性时发生了同样的错误。

标签: angularngx-bootstrapngx-datatable

解决方案


可能需要模板引用变量,所以尝试定义数据表的实例

@ViewChild('firstTable') myTable: DatatableComponent;

从NGX-Datatables引用。如何获取当前表实例?


推荐阅读