I tried to implement one of the following examples:
https://www.ag-grid.com/ag-grid-angular2-support/
colDef = {
// instead of cellRenderer we use cellRendererFramework
cellRendererFramework: {
template: '{{params.value | currency}}',
moduleImports: [CommonModule]
},
// specify all the other fields as normal
headerName: "Currency Pipe Template",
field: "value",
width: 200
The import in the module:
@NgModule({
imports: [
.....
AgGridModule.withComponents([])
],
I get the following error:
ERROR Error: No component factory found for [object Object]. Did you add it to @NgModule.entryComponents? at noComponentFactoryError (core.es5.js:3302) [angular] at _NullComponentFactoryResolver.resolveComponentFactory (core.es5.js:3320) [angular] at CodegenComponentFactoryResolver.resolveComponentFactory (core.es5.js:3362) [angular] at CodegenComponentFactoryResolver.resolveComponentFactory (core.es5.js:3362) [angular] at Ng2ComponentFactory.createComponent (ng2ComponentFactory.js:149) [angular] at CellRenderer.createComponent (ng2ComponentFactory.js:47) [angular] at CellRenderer.BaseGuiComponent.init (ng2ComponentFactory.js:167) [angular] at CellRenderer.init (ng2ComponentFactory.js:34) [angular] at CellRendererService.useCellRenderer (cellRendererService.js:49) [angular] at RenderedCell.useCellRenderer (renderedCell.js:1009) [angular] at RenderedCell.putDataIntoCell (renderedCell.js:957) [angular] at RenderedCell.populateCell (renderedCell.js:784) [angular] at RenderedCell.init (renderedCell.js:323) [angular] at vendor.bundle.js:19006:115 [angular]
I get the same error with:
@NgModule({
imports: [
.....
AgGridModule.withComponents([CommonModule])
],
Or with:
colDef = {
// instead of cellRenderer we use cellRendererFramework
cellRendererFramework: {
template: '{{params.value}}'
},
// specify all the other fields as normal
headerName: "Currency Pipe Template",
field: "value",
width: 200
@NgModule({
imports: [
.....
AgGridModule.withComponents([])
],
What is the correct module for the import or for the entryComponents??