I have my angular app that uses the latest gantt version.
I’m not sure where or how to add the enterprise license? Where can I do this? Also after downloading the files where can I find the enterprise licence?
I keep getting the error TS2304: Cannot find name ‘gantt’.
import { Component, ElementRef, OnInit, ViewChild, ViewEncapsulation } from '@angular/core';
import "scripts/thirdParty/dhtmlxGantt/codebase/dhtmlxgantt.css";
import "dhtmlx-gantt";
import { GanttPropertyService } from '../services/gantt/ganttPropertyService';
@Component({
encapsulation: ViewEncapsulation.None,
selector: 'gantt',
templateUrl: './gantt.component.html',
styleUrls: ['./gantt.component.css'],
providers: [ GanttPropertyService ]
})
export class GanttComponent implements OnInit {
@ViewChild("gantt_here", {static: true}) ganttContainer: ElementRef;
constructor(private ganttPropertyService: GanttPropertyService) {
}
ngOnInit(){
this.ganttPropertyService.init(gantt);
gantt.init(this.ganttContainer.nativeElement);
}
}
ramil
October 2, 2019, 10:43am
#2
Hello,
We don’t have an NPM package of the Pro version. But you can install Gantt as an NPM package the following way:
Unpack Gantt to a specific folder, for example, to /opt/gantt_pro
If your Gantt version is 6.1.x, you need to replace the package.json
file with the following one:
https://files.dhtmlx.com/30d/cb80c0faf513b1caab81d79fe9266c4e/package.json
Use the following command to install Gantt:
npm install /opt/gantt_pro
You can read more about installation methods in the following article:
https://docs.dhtmlx.com/gantt/desktop__install_with_bower.html#addingproeditionintoproject
Also after downloading the files where can I find the enterprise licence?
The files themselves are located in the codebase
folder. But if you install Gantt as described above, you probably won’t need to install them separately.
Thanks! That helped a lot!
hi i downloaded gantt trial version from https://dhtmlx.com/docs/products/dhtmlxGantt/download.shtml
this link. I am using angular v10.
i extracted the gantt zip folder and placed it inside src folder
from this src path i executed npm install
.
and then i followed npm link
now in my project im getting Cannot find name ‘gantt’.
any solution to resolve this issue would be helpfull
ramil
January 22, 2021, 10:12am
#5
Hello Justin,
Unfortunately, I couldn’t reproduce the issue.
Here is the demo where it works correctly:
https://files.dhtmlx.com/30d/5c27a7e5dfbb10ff8473fbdf15fca6b0/angular10+gantt_7.0.5_trial.zip
Just run the npm install
command and run the project.