DevExtreme Angular - Licensing - DevExtreme Angular Documentation v23.2 (2024)

Log in to the DevExpress Download Manager. Find your DevExtreme subscription license in the product list. Expand the product entry to access available downloads and additional information. Follow on-screen instructions to copy your key.

After you obtain the key from the DevExpress Download Manager, define that key as a constant in a separate file and use that constant in your application configuration. Below there are instructions on how to set up a license key based on whether your project is modular or non-modular. The difference is how new files are added to the project: either through import (require) statements or by directly referencing the file from a page using <script> tags.

jQuery

Non-Modular

Create a new file in the folder where you store your project sources. For example, your file path may look like this: src/devextreme-license.js. Specify your DevExtreme license key in GlobalConfig:

devextreme-license.js

DevExpress.config({ licenseKey: 'DEVELOPER_LICENSE_KEY' });

To allow each developer to use their own license key, do not store this file in your repository. Instruct Git to ignore the file that holds the key. To do this, add the file path to your project's .gitignore file:

.gitignore

src/devextreme-license.js

This action also ensures that your team does not commit the key by accident.

If your project includes sources via <script> tags (does not use bundlers), add a reference to the file that registers the license key:

index.html

<script src="./dx.all.js" type="text/javascript"> </script> <script src="./devextreme-license.js" type="text/javascript"></script>

Modular

Create a new file in the folder where you store your project sources. For example, your file path may look like this: src/devextreme-license.ts. Paste the license key you copied from the Download Manager:

devextreme-license.ts

export const licenseKey = 'DEVELOPER_LICENSE_KEY’;

To allow each developer to use their own license key, do not store this file in your repository. Instruct Git to ignore the file that holds the key. To do this, add the file path to your project's .gitignore file:

.gitignore

src/devextreme-license.ts

This action also ensures that your team does not commit the key by accident.

Specify your DevExtreme license key in GlobalConfig. This should be done in the entry point of the application:

import config from 'devextreme/core/config'; import { licenseKey } from './devextreme-license'; config({ licenseKey }); 
Angular

Modular

Create a new file in the folder where you store your project sources. For example, your file path may look like this: src/devextreme-license.ts. Paste the license key you copied from the Download Manager:

devextreme-license.ts

export const licenseKey = 'DEVELOPER_LICENSE_KEY’;

To allow each developer to use their own license key, do not store this file in your repository. Instruct Git to ignore the file that holds the key. To do this, add the file path to your project's .gitignore file:

.gitignore

src/devextreme-license.ts

This action also ensures that your team does not commit the key by accident.

Specify your DevExtreme license key in GlobalConfig. This should be done in the entry point of the application:

JavaScript

import config from 'devextreme/core/config'; import { licenseKey } from './devextreme-license'; config({ licenseKey }); 

Non-Modular

Create a new file in the folder where you store your project sources. For example, your file path may look like this: src/devextreme-license.js. Specify your DevExtreme license key in GlobalConfig:

devextreme-license.js

DevExpress.config({ licenseKey: 'DEVELOPER_LICENSE_KEY' });

To allow each developer to use their own license key, do not store this file in your repository. Instruct Git to ignore the file that holds the key. To do this, add the file path to your project's .gitignore file:

.gitignore

src/devextreme-license.js

This action also ensures that your team does not commit the key by accident.

If your project includes sources via <script> tags (does not use bundlers), add a reference to the file that registers the license key:

<script src="./dx.all.js" type="text/javascript"> </script> <script src="./devextreme-license.js" type="text/javascript"></script>
Vue

Modular

Create a new file in the folder where you store your project sources. For example, your file path may look like this: src/devextreme-license.ts. Paste the license key you copied from the Download Manager:

devextreme-license.ts

export const licenseKey = 'DEVELOPER_LICENSE_KEY’;

To allow each developer to use their own license key, do not store this file in your repository. Instruct Git to ignore the file that holds the key. To do this, add the file path to your project's .gitignore file:

.gitignore

src/devextreme-license.ts

This action also ensures that your team does not commit the key by accident.

Specify your DevExtreme license key in GlobalConfig. This should be done in the entry point of the application:

JavaScript

import config from 'devextreme/core/config'; import { licenseKey } from './devextreme-license'; config({ licenseKey }); 

Non-Modular

Create a new file in the folder where you store your project sources. For example, your file path may look like this: src/devextreme-license.js. Specify your DevExtreme license key in GlobalConfig:

devextreme-license.js

DevExpress.config({ licenseKey: 'DEVELOPER_LICENSE_KEY' });

To allow each developer to use their own license key, do not store this file in your repository. Instruct Git to ignore the file that holds the key. To do this, add the file path to your project's .gitignore file:

.gitignore

src/devextreme-license.js

This action also ensures that your team does not commit the key by accident.

If your project includes sources via <script> tags (does not use bundlers), add a reference to the file that registers the license key:

index.html

<script src="./dx.all.js" type="text/javascript"> </script> <script src="./devextreme-license.js" type="text/javascript"></script>
React

Modular

Create a new file in the folder where you store your project sources. For example, your file path may look like this: src/devextreme-license.ts. Paste the license key you copied from the Download Manager:

devextreme-license.ts

export const licenseKey = 'DEVELOPER_LICENSE_KEY’;

To allow each developer to use their own license key, do not store this file in your repository. Instruct Git to ignore the file that holds the key. To do this, add the file path to your project's .gitignore file:

.gitignore

src/devextreme-license.ts

This action also ensures that your team does not commit the key by accident.

Specify your DevExtreme license key in GlobalConfig. This should be done in the entry point of the application:

JavaScript

import config from 'devextreme/core/config'; import { licenseKey } from './devextreme-license'; config({ licenseKey }); 

Non-Modular

Create a new file in the folder where you store your project sources. For example, your file path may look like this: src/devextreme-license.js. Specify your DevExtreme license key in GlobalConfig:

devextreme-license.js

DevExpress.config({ licenseKey: 'DEVELOPER_LICENSE_KEY' });

To allow each developer to use their own license key, do not store this file in your repository. Instruct Git to ignore the file that holds the key. To do this, add the file path to your project's .gitignore file:

.gitignore

src/devextreme-license.js

This action also ensures that your team does not commit the key by accident.

If your project includes sources via <script> tags (does not use bundlers), add a reference to the file that registers the license key:

index.html

<script src="./dx.all.js" type="text/javascript"> </script> <script src="./devextreme-license.js" type="text/javascript"></script>

You may need to use your license key in multiple places (your projects and CI systems). In such cases, you can store your DevExtreme license in key in an environment variable. You can then read that variable's value and create necessary files on demand.

The following code is an example of a script you may use in your projects. If the license key file does not exist, the script creates a new file and uses the DEVEXTREME_KEY environment variable to specify the key.

You can call the node add-devextreme-license command to invoke the script manually. We recommend that you include this command in npm's postinstall script. In this case, every developer has an automatically created license key file after they install NPM modules.

Register the key within GlobalConfig and add the devextreme-license.ts file path to your project's .gitignore file. See the previous section for details.

DevExtreme Angular - Licensing - DevExtreme Angular Documentation v23.2 (2024)
Top Articles
Latest Posts
Article information

Author: Fredrick Kertzmann

Last Updated:

Views: 5521

Rating: 4.6 / 5 (66 voted)

Reviews: 81% of readers found this page helpful

Author information

Name: Fredrick Kertzmann

Birthday: 2000-04-29

Address: Apt. 203 613 Huels Gateway, Ralphtown, LA 40204

Phone: +2135150832870

Job: Regional Design Producer

Hobby: Nordic skating, Lacemaking, Mountain biking, Rowing, Gardening, Water sports, role-playing games

Introduction: My name is Fredrick Kertzmann, I am a gleaming, encouraging, inexpensive, thankful, tender, quaint, precious person who loves writing and wants to share my knowledge and understanding with you.