Hi,
Today, with help of Telerik support, I've included Kendo UI in ASP.NET Boilerplate application. Since I can't find any posting on this, I share our results with you.
Integrating the Kendo UI CDN scripts in Angualar project:
1) Add the Kendo UI styles to the "layout.cshtml" page, inside the Web project, "App" folder:
- file path: testProject\testProject.Web\App\Main\views\layout\layout.cshtml
- styles added:
<
head
>
....
@Scripts.Render("~/Bundles/App/Main/js")
<
link
rel
=
"stylesheet"
href
=
"http://kendo.cdn.telerik.com/2016.3.914/styles/kendo.common.min.css"
>
<
link
rel
=
"stylesheet"
href
=
"http://kendo.cdn.telerik.com/2016.3.914/styles/kendo.rtl.min.css"
>
<
link
rel
=
"stylesheet"
href
=
"http://kendo.cdn.telerik.com/2016.3.914/styles/kendo.default.min.css"
>
<
link
rel
=
"stylesheet"
href
=
"http://kendo.cdn.telerik.com/2016.3.914/styles/kendo.mobile.all.min.css"
>
</
head
>
2) Add the Kendo UI scripts to the "layout.cshtml" page, inside the Web project, "App" folder:
- file path: testProject\testProject.Web\App\Main\views\layout\layout.cshtml
- project already contains jQuery and Angular scripts
- Note: the insert of Kendo UI scripts must be after loading jquery. This differs between Boilerplate project types.
- Script insert at bottom of file:
....
@Html.IncludeScript(ScriptPaths.JQuery_Timeago_Localization)
<!-- Scripts of Kendo UI -->
<
script
src
=
"http://kendo.cdn.telerik.com/2016.3.914/js/jszip.min.js"
></
script
>
<
script
src
=
"http://kendo.cdn.telerik.com/2016.3.914/js/kendo.all.min.js"
></
script
>
<!-- Dynamic scripts of ABP system (They are created on runtime and can not be bundled) -->
....
3) Register the Kendo UI directives in the application module:
- file path: \testProject\testProject.Web\App\Main\app.js
- modify app module:
var
app = angular.module(
'app'
, [
'ngAnimate'
,
'ngSanitize'
,
'kendo.directives'
,
//-- <<< Add this directive
'ui.router'
,
'ui.bootstrap'
,
'ui.jq'
,
'abp'
]);
4) Test example Kendo UI widget to a view in
the project:
- file path: \testProject\testProject.Web\App\Main\views\tenants\index.cshtml
- modify page:
<
div
ng-controller
=
"app.views.tenants.index as vm"
>
<
h1
>@L("Tenants")</
h1
>
<
input kendo-date-time-picker
style
=
"width: 100%;"
/>