Closed paulido closed 6 months ago
Hi,
Try setting the type of dtOptions
as any
.
@paulido I have the same error. I am on angular 15. Type of ɵɵDirectiveDeclaration
in this version of angular can accept only string. I think need upgrade angular higher than 15 version.
For those who are facing the same problem, I got it working using the angular-datatables@15.0.2:
npm install jquery --save
npm install datatables.net --save
npm install datatables.net-dt --save
npm install angular-datatables@15 --save
npm install @types/datatables.net@1.10.21 --save-dev
It looks like the angular-datatables@17 is not compatible with angular@15 (it does work with angular@16)
Error: node_modules/angular-datatables/src/angular-datatables.directive.d.ts:41:86 - error TS2344: Type '{ dtOptions: { alias: "dtOptions"; required: false; }; dtTrigger: { alias: "dtTrigger"; required: false; }; }' does not satisfy the constraint '{ [key: string]: string; }'. Property '"dtOptions"' is incompatible with index signature. Type '{ alias: "dtOptions"; required: false; }' is not assignable to type 'string'.