无法绑定到“行”,因为它不是'ngx-datatable'的已知属性

问题描述 投票:2回答:1

我遵循了这个link,但是无论我在哪里添加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属性发生相同的错误。

angular ngx-bootstrap ngx-datatable
1个回答
0
投票

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

@ViewChild('firstTable') myTable: DatatableComponent;

引自NGX-Datatables. How to get current table instance?

© www.soinside.com 2019 - 2024. All rights reserved.