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.
P-table problem
-
- Posts: 449
- Joined: 08 Aug 2018, 14:09
Hi,nikola184 wrote: ↑29 Aug 2019, 17:13I 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.
You need import to your app.module.
Best Regards.
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.
"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.
-
- Posts: 449
- Joined: 08 Aug 2018, 14:09
-
- Information
-
Who is online
Users browsing this forum: No registered users and 10 guests