IMPORTANT!
This forum is now archived. Click here for the New Support Forum
Prime NG Table
Quote from David Greatorex on February 14, 2018, 1:54 pmHi,
I am wondering what I am doing wrong when trying to add primeng/table
I have done the following
- added primeng via nmp saving this to the project
- added primeng/table to the webpack.config.vendor.js(at the bottom of nonTreeShakableModules list)
- added import { TableModule } from 'primeng/table'; to app.model.ts
- modified the product component to have the dynamic example from this site https://www.primefaces.org/primeng/#/table
- Error
Can't bind to 'columns' since it isn't a known property of 'p-table'. 1. If 'p-table' is an Angular component and it has 'columns' input, then verify that it is part of this module. 2. If 'p-table' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message. 3. To allow any property add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component. (" /div> h3>Dynamic Columns/h3> p-table [ERROR ->][columns]="cols" [value]="cars"> ng-template pTemplate="header" let-columns> tr> "): ng:///AppModule/ProductsComponent.html@10:9 Can't bind to 'value' since it isn't a known property of 'p-table'. 1. If 'p-table' is an Angular component and it has 'value' input, then verify that it is part of this module. 2. If 'p-table' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message. 3. To allow any property add 'NO_ERRORS_SCHEMA' to the '@NgModule
In short what are the correct steps to add additional angular resources and utilise them in this project template?
Many thanks
Dave
Hi,
I am wondering what I am doing wrong when trying to add primeng/table
I have done the following
- added primeng via nmp saving this to the project
- added primeng/table to the webpack.config.vendor.js(at the bottom of nonTreeShakableModules list)
- added import { TableModule } from 'primeng/table'; to app.model.ts
- modified the product component to have the dynamic example from this site https://www.primefaces.org/primeng/#/table
- Error
Can't bind to 'columns' since it isn't a known property of 'p-table'. 1. If 'p-table' is an Angular component and it has 'columns' input, then verify that it is part of this module. 2. If 'p-table' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message. 3. To allow any property add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component. (" /div> h3>Dynamic Columns/h3> p-table [ERROR ->][columns]="cols" [value]="cars"> ng-template pTemplate="header" let-columns> tr> "): ng:///AppModule/ProductsComponent.html@10:9 Can't bind to 'value' since it isn't a known property of 'p-table'. 1. If 'p-table' is an Angular component and it has 'value' input, then verify that it is part of this module. 2. If 'p-table' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message. 3. To allow any property add 'NO_ERRORS_SCHEMA' to the '@NgModule
In short what are the correct steps to add additional angular resources and utilise them in this project template?
Many thanks
Dave
Quote from David Greatorex on February 14, 2018, 2:02 pmAlso added to package.json - > dependencies
Also added to package.json - > dependencies
Quote from Eben Monney on February 24, 2018, 4:58 pmThere are no special steps specific for this project. The same angular approach you use with Angular Cli or Webpack should work.
You stated "added import { TableModule } from 'primeng/table'; to app.model.ts"
You'll also need to add TableModule to the imports of NgModule.
@NgModule({ imports: [TableModule, ...Check that you have the above entry in the module you're importing TableModule into.
There are no special steps specific for this project. The same angular approach you use with Angular Cli or Webpack should work.
You stated "added import { TableModule } from 'primeng/table'; to app.model.ts"
You'll also need to add TableModule to the imports of NgModule.
@NgModule({ imports: [TableModule, ...
Check that you have the above entry in the module you're importing TableModule into.
IMPORTANT!
This forum is now archived. Click here for the New Support Forum