Im using angular 11.1.0 with ag-grid 24.0.0
When I try to load a dynamic angular component with the frameworkComponent @Input I get this following error: ASSERTION ERROR: Type passed in is not ComponentType, it does not have 'ɵcmp' property.
This is how I declare it in the HTML:
<ag-grid-angular style="width: 100%; height: 300px;" class="ag-theme-alpine" [frameworkComponents]="frameworkComponents" [rowData]="item.condittions", (gridReady)="onGridReady($event)" [columnDefs]="columnDefs">
And in the component:
frameworkComponents: { audianceCellRenderer: AssetsCellRendererComponent, };
columnDefs = [ {field: 'name'}, {field: 'sendEmail'}, {field: 'audiance', cellRendererFramework: 'audianceCellRenderer'}, {field: 'sop'}, ];
I have tried adding the component to entryComponents, tried adding the component to the withComponnet method of Ag-grid but with no success.
Any help would be appreciated.
For anyone that comes up with this issue, My mistake was this line:
{field: 'audience, cellRendererFramework: 'audianceCellRenderer'},
I accidentally entered the key of the component and not the component itself.
Im sure I'm not going to make this mistake again:)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.