I have used DHX scheduler (GPL) following the article: https://dhtmlx.com/blog/angular-dhtmlxscheduler-tutorial/ , and it work well.
I was trying to use Timeline view, and I found the function of scheduler in my code can’t work anymore.
Functions like scheduler.parse scheduler,config, etc. It’s all right when compile, the error occurred when the function was executed.
Error message :
ScheduleToolComponent_Host.ngfactory.js? [sm]:1 ERROR TypeError: Cannot read property ‘config’ of undefined
So, how can I use the dhtmlx-scheduler-evaluation in angular ?
For more information:
I resolved the compile error when I import {} from @types/dhtmlxcheduler in GPL version by adding this in Tsconfig.app.json :
“compilerOptions”: {
“outDir”: “…/out-tsc/app”,
“types”: [“dhtmlxscheduler”]
_}
After download the PRO version package, I remove the previous version:
npm uninstall dhtmlx-scheduler --save
npm uninstall @types/dhtmlxscheduler --save
and remove the folders:
/node-modules/dhtmlx-scheduler
@types/dhtmlxscheduler
and remove the line: “types”: [“dhtmlxscheduler”] in Tsconfig.app.json
then I install the PRO version by :
npm install D:\Project\scheduler_trial --save
in GPL version ,I use the scheduler instance by
import “dhtmlx-scheduler”;
import {} from “@types/dhtmlxscheduler”;
in Trail Version , I import like this
import “dhtmlx-scheduler-evaluation”
import { scheduler } from ‘dhtmlx-scheduler-evaluation’;
I found in GPL version(4.3.0), the “scheduler” was definited in @types/dhtmlxscheduler/index.d.ts
and in Trail version(5.3.6) it looks like in the “/node-modules/dhtmlx-scheduler-evaluation/dhtmlxscheduler.d.ts”