You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/intro/installation/using-license-code.md
+63-1Lines changed: 63 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -45,6 +45,18 @@ Then, utilize the `KendoLicensing.setScriptKey()` method.
45
45
46
46
Use the [previously generated code](#1-get-a-license-key) and place it in the main script file the where Kendo UI for jQuery scripts are imported.
47
47
48
+
```js
49
+
import"@progress/kendo-ui";
50
+
51
+
KendoLicensing.setScriptKey(
52
+
'Your license code'
53
+
);
54
+
55
+
$("#grid").kendoGrid();
56
+
```
57
+
58
+
or
59
+
48
60
```js
49
61
require("@progress/kendo-ui");
50
62
@@ -55,7 +67,33 @@ KendoLicensing.setScriptKey(
55
67
$("#grid").kendoGrid();
56
68
```
57
69
58
-
### Use a Script Reference
70
+
The examples above illustrates a single include of `kendo.all.js` in your main javascript file that could be located in one of the [common places](#common-places-to-setup-the-license-code).
71
+
72
+
In most cases you would need several imports of the Kendo libraries and you would need to setup the license code only on one place (most likely your main js file in your application). In that case, import the `kendo.core.js` and register your license code as usual:
73
+
74
+
```js
75
+
import'@progress/kendo-ui/js/kendo.core';
76
+
77
+
KendoLicensing.setScriptKey(
78
+
'Your license code'
79
+
);
80
+
81
+
// Rest of the code
82
+
```
83
+
84
+
or
85
+
86
+
```js
87
+
require("@progress/kendo-ui/js/kendo.core");
88
+
89
+
KendoLicensing.setScriptKey(
90
+
'Your license code'
91
+
);
92
+
93
+
// Rest of the code
94
+
```
95
+
96
+
### Using Script Reference
59
97
60
98
Use the [previously generated code](#1-get-a-license-key) and place it right after the script tag.
61
99
@@ -69,6 +107,30 @@ Use the [previously generated code](#1-get-a-license-key) and place it right aft
69
107
</script>
70
108
```
71
109
110
+
### Common Places to Setup the License Code
111
+
112
+
Most common files to place the license code in your application are:
113
+
114
+
**For JS Applications:**
115
+
-`./index.(html|js|ts)`
116
+
-`./main.(html|js|ts)`
117
+
-`./app.(html|js|ts)`
118
+
-`./(dist|src)/index.(html|js|ts)`
119
+
-`./(dist|src)/main.(html|js|ts)`
120
+
-`./(dist|src)/app.(html|js|ts)`
121
+
122
+
**For ASP.NET MVC Applications:**
123
+
-`./Views/Shared/_Layout.cshtml`
124
+
-`./Scripts/index.(js|ts)`
125
+
-`./Scripts/site.(js|ts)`
126
+
127
+
**For ASP.NET Core Applications:**
128
+
-`./Views/Shared/_Layout.cshtml`
129
+
-`./Pages/Shared/_Layout.cshtml`
130
+
-`./Pages/_Layout.cshtml`
131
+
-`./wwwroot/js/index.js`
132
+
-`./wwwroot/js/site.js`
133
+
72
134
## Next Steps
73
135
74
136
*[Create Your Own Custom Bundles]({% slug include_only_what_you_need_kendoui_scripts %})
0 commit comments