Closed agarciacalvo closed 1 year ago
The problem here is this JSGantt.JSGantt.GanttChart
its duplicated right
Yes. This appears after changing index.ts to remove:
module.exports = jsGantt.JSGantt;
Because Angular fails if you mix module.exports & export. The other side efect in ng-gantt.ts I think is better now, importing all JSGantt and not directrly GanttChart.
but check it out.. if someone will use in vanilla js.. will be something like this
g = new JSGantt.JSGantt.GanttChart(document.getElementById('embedded-Gantt'), 'week');
its weird making it twice like JSGantt.JSGantt.GanttChart
It's weird, and It's mandatory to avoid this silly breaking change, I think.
But I can't get it rigth. May can we ask for help opening an issue on this project?
I was working on this but the solution I made need to change the JSGantt calls (see changed docs/index.js).
Also, it's needed to change line 4 of ng-gantt.js to:
import { JSGantt } from 'jsgantt-improved';
And line 42 to:
const g = this.editor = new JSGantt.GanttChart(this.ganttEditorContainer.nativeElement, this.format);
Hope @mariohmol can finish the job :)