Adding Enterprise liscence to angular app

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);
  }
}

Hello,

We don’t have an NPM package of the Pro version. But you can install Gantt as an NPM package the following way:

  1. Unpack Gantt to a specific folder, for example, to /opt/gantt_pro
  2. 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
  3. 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.

  1. i extracted the gantt zip folder and placed it inside src folder
  2. from this src path i executed npm install .
  3. 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

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.