Using Schedular with Angular app (and few others questions)


#1

Hello :wave:,

How are you guys doing?

I downloaded a trial version of Scheduler Pro (which is valid for 30 days I believe) and I am trying to integrate it with an Angular (version 7, if that matters) app.

I have a few questions regarding this, and I am hoping you can help me out with these:

  1. In package.json, the license is
    "license": "DHTMLX Evaluation",
    so when I start the running the app, I get this warning

warning package.json: License should be a valid SPDX license expression

should I not have a trial license here? (Mind you, the app still runs).
If yes, where do I get it?
If not, What happens if I don’t enter a license key here at all - how would that validate if 30 days has been crossed or not? Or is the 30 days for support only and then I have to buy the license for more support? (I am planning on using this in a SASS product, therefore, I should buy the 1200 USD Commerical license from what I’ve seen on your site - correct me if I am wrong here?) :thinking:.

  1. I came across the NPM package - https://www.npmjs.com/package/dhtmlx-scheduler - is this the same as the Pro version? If it is, I can pull this and start using it - but then, where would I set the license key :thinking:. Or again, is the license for support and distribution rights?

  2. On a related note - how do I integrate the Pro version with my angular app - I have the JS file - which I got via email. Do I just take this file and start using it? Angular integration and @Input() would make my life easier - but even the .js file is ok.

  3. I saw the angular app demo - https://dhtmlx.com/blog/dhtmlx-gantt-chart-usage-angularjs-2-framework/ - the UI looks pretty out of date - and I am not sure which version of the NPM package will work with angular 7.
    Will all the configs part of the JS samples work as directives for the NPM package?

Thanks for your help.


Cannot run the plugin
#2

Hello @anirudhr,

Pretty good, I hope you also :slight_smile:

I’ll try to answer questions, please feel free to clarify if something won’t be clear enough, or if I will miss something.

should I not have a trial license here? (Mind you, the app still runs).
If yes, where do I get it?

There is no need to print any license key.

If not, What happens if I don’t enter a license key here at all - how would that validate if 30 days has been crossed or not? Or is the 30 days for support only and then I have to buy the license for more support?

In the case of the evaluation version, after 30 days of use - it will show the alert message, shows that the trial period is expired.

(I am planning on using this in a SASS product, therefore, I should buy the 1200 USD Commerical license from what I’ve seen on your site - correct me if I am wrong here?) :thinking:.

Yes, in the case of SaaS products you can use GPL(in the case of open source products GPL) or Enterprise/Ultimate(non-GPL projects) licenses:
https://dhtmlx.com/docs/products/licenses.shtml

I came across the NPM package - https://www.npmjs.com/package/dhtmlx-scheduler - is this the same as the Pro version? If it is, I can pull this and start using it - but then, where would I set the license key :thinking:. Or again, is the license for support and distribution rights?

The npm package provides only the GPL version of the scheduler, which doesn’t support PRO features and allowed to use only in open sources GPL projects. PRO versions are available only from local installing.

On a related note - how do I integrate the Pro version with my angular app - I have the JS file - which I got via email. Do I just take this file and start using it? Angular integration and @Input() would make my life easier - but even the .js file is ok.

The way of adding pro edition to your project is described by the following link:
https://docs.dhtmlx.com/scheduler/install_with_bower.html#addingproeditionintoproject

Here are the main steps:

1.) Copy the Scheduler codebase into some local directory.
2.)Initialize the npm package there. Name the package dhtmlx-scheduler or whatever you like. Make sure to set dhtmlxscheduler.js as a main file in package.json as "main": "codebase/dhtmlxscheduler.js".
// in case of already existing project
3.) Go to your project directory.
4.) Call npm install ../scheduler-local-package-path.

I saw the angular app demo - https://dhtmlx.com/blog/dhtmlx-gantt-chart-usage-angularjs-2-framework/ - the UI looks pretty out of date - and I am not sure which version of the NPM package will work with angular 7.
Will all the configs part of the JS samples work as directives for the NPM package?

The following demo:


is the “gantt” component, as you probably asking about the scheduler(please correct me if I’m mistaken).

Here is the angular+scheduler demo:


which you can use as a code reference.
I’ve just tested it with the latest version of the scheduler, and it works correctly.

Kind regards,


#3

Again, just to clarify - this (https://github.com/DHTMLX/angular-scheduler) is the free-version no? I should use the local .js file if I want the pro-version features?


#4

Never mind @Siarhei, I literally used the locally published package in place of the npm package and I could get the pro version working as is (Using this example - https://dhtmlx.com/blog/angular-dhtmlxscheduler-tutorial/). Thanks for the help.

Problem was that I published from inside the codebase/ directory instead of root-directory, hence I had to change a lot of path related stuff is all.