Working on my project, I have encountered a problem with the kendo ui scheduler where the downloading of the kendo js and css files on the client side is causing slowness on our website. To address this issue, we are attempting to download the kendo js and css files only when the scheduler calendar page is loaded. However, we are facing difficulties in adding the dependency "kendo.directive." Can anyone suggest how to add this dependency or provide an alternative solution to reduce the delay?
Below is the code snippet for reference:
myApp.requires.push('kendo.directives');
myApp.controller('CalenderController',['$scope', '$http', 'StatsService', function ($scope, $http, StatsService) {
var self=this;
$scope.schedulerOptions = {
date: new Date(),
startTime: new Date(),
showWorkHours: true,
height: 600,
views: [
"day",
{type: "week", selected: true},
],
editable: {
destroy: false,
create: false,
template: $("#editor").html()
},
timezone: "GMT",
dataSource: {
batch: true,
transport: {
read: function (options) {
url = '/consultants/applications/interviews';
$http.get(url).success(function (data, status, headers, config) {
options.success(data.result);
}).error(function (data, status, headers, config) {
options.error(data);
});
},
parameterMap: function (options, operation) {
if (operation !== "read" && options.models) {
return {models: kendo.stringify(options.models)};
}
}
},
schema: {
model: {
id: "interviewId",
fields: {
taskId: {from: "id", type: "number", editable: false},
candidateName: {from: "candidateName" , editable: false},
title: {from: "title", defaultValue: "No title" , editable: false},
companyName: {from: "companyName" , editable: false},
start: {type: "date", from: "interviewTiming", editable: false},
end: {type: "date", from: "interviewEndTiming" , editable: false},
candidateEmail: {from: "candidateEmail" , editable: false},
candidateMobile: {from: "candidateMobile" , editable: false}
}
}
}
}
};
}]);