Page 1 of 1

P-table problem

Posted: 29 Aug 2019, 17:13
by nikola184
I have question about component p-table - when I create project and save example from site in app.component.ts and in app.component.html, it works, but if I use template material dashboard and want to integrate it doesn't work.

Error: p-table is not a known element. I create component table-list.component.ts, same with app.component.ts and table-list.component.html, table-list.module.ts with code.
In file table-list.component.ts, I import TableModule from primeng/table.
What is the problem? Please help me.

Re: P-table problem

Posted: 03 Sep 2019, 12:30
by yigitfindikli
nikola184 wrote:
29 Aug 2019, 17:13
I have question about component p-table - when I create project and save example from site in app.component.ts and in app.component.html, it works, but if I use template material dashboard and want to integrate it doesn't work.

Error: p-table is not a known element. I create component table-list.component.ts, same with app.component.ts and table-list.component.html, table-list.module.ts with code.
In file table-list.component.ts, I import TableModule from primeng/table.
What is the problem? Please help me.
Hi,
You need import to your app.module.
Best Regards.

Re: P-table problem

Posted: 05 Sep 2019, 10:31
by nikola184
I put it here but suppose that is problem with css file or theme, because I made it print on screen data without styles. Insert peace of code:
"styles": [
"node_modules/primeng/resources/themes/nova-light/theme.css",
"node_modules/primeng/resources/primeng.min.css",
"node_modules/primeicons/primeicons.css"

], in angular.json but nothing hapened.

Re: P-table problem

Posted: 05 Sep 2019, 10:49
by nikola184
I resolved - thank you.

Re: P-table problem

Posted: 05 Sep 2019, 14:25
by yigitfindikli
nikola184 wrote:
05 Sep 2019, 10:49
I resolved - thank you.
Always happy to help!
Best Regards.

Re: P-table problem

Posted: 07 Sep 2019, 11:54
by David821
The error you received is an indirect way of telling you that your app does not know what a p-dataTable component is .