This is a migrated thread and some comments may be shown as answers.

Kendo UI with Angular and Require

9 Answers 212 Views
Integration with other JS libraries
This is a migrated thread and some comments may be shown as answers.
Matthew
Top achievements
Rank 1
Matthew asked on 25 Feb 2016, 09:41 AM

Hi I have a complex application based on ASP.NET MVC and Angular in which I am trying to evaluating the kendo ui scheduler. I'm loading my JS files with RequireJS. When I load kendo.ui.min I get an error in the application when it attempts to get "scripts/jquery.min.js", this not where jquery lives in my app.

 

Now I've specified in require that kendo cannot be loaded until jquery is loaded, and it is definitely already loaded. So why is kendo requesting jquery from a location that doesn't even exist?If I don't load the kendo library there is no erroneous jquery file call.

9 Answers, 1 is accepted

Sort by
0
Matthew
Top achievements
Rank 1
answered on 26 Feb 2016, 11:23 AM
I haven't completely solved my issue, kendo ui still isn't available where I want it but I have solved the strange jquery call, it turns out I was shimming kendo when it is already amd, just calling it in require without the shim has stopped that issue. Now I just need to know what kendo ui's module name is in Angular?
0
Georgi Krustev
Telerik team
answered on 29 Feb 2016, 08:34 AM
Hello Matthew,

The Scheduler widget is included in the premium Kendo UI package: That being said, you will need to include either only the Scheduler references or kendo.all.min.js, because open-source package does not include the required widget. Check this help article for more details how to use Kendo with packaging tools:
Regards,
Georgi Krustev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Matthew
Top achievements
Rank 1
answered on 29 Feb 2016, 10:09 AM

Thanks for the reply Georgi,

After my first post I realised it was kendo.all.min I need and I have been attempting to use that. I am at the stage where I can load the file from Require (or even just pull it in from the head of the page) but I cannot seem to access Kendo's angular module. When I inject the module into a controller nothing seems to work, what does kendo identify itself as "kendo.ui", "kendo.all" etc? Or do I need another file alongside kendo.all.min to "see"  Kendo within Angular?

0
Matthew
Top achievements
Rank 1
answered on 29 Feb 2016, 12:59 PM

Further to my issue, I've been looking at the demo at: http://demos.telerik.com/kendo-ui/angularjs-dashboard-sample-app/#/regional-sales

If I import the all.min file that came with my Kendo UI (v2016.1.112), I can see the file being pulled in but I cannot access the kendo object in the console.

But if I import all.min from the demo (https://kendo.cdn.telerik.com/2015.3.1111/js/kendo.all.min.js) in exactly the same manner I CAN see the kendo object in the console. 

Is there something wrong with the current kendo UI download??

0
Matthew
Top achievements
Rank 1
answered on 01 Mar 2016, 03:17 PM

Problem mostly resolved. It's a complicated application we are evaluating this product in and it took a few passes to get the Require set up and the Angular namespace to work correctly. It cannot be stressed strongly enough though that it does not work with the version I have downloaded from your site and is currently working from a version on your cdns.

It appears to me there is a problem with the downloaded version...

0
Georgi Krustev
Telerik team
answered on 02 Mar 2016, 10:06 AM
Hello Matthew,

I am glad to hear the problem you are experiencing is mostly resolved.

As to the issue you are describing related to the downloaded version, we will need more details that would help us to investigate further issue. A repro demo or enough information that will help us to resolve the issue will be much appreciated.

Regards,
Georgi Krustev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Matthew
Top achievements
Rank 1
answered on 02 Mar 2016, 10:25 AM

Quite simply my require config is doing something like:

var require = {
    ...
    paths: {

      "kendo.all.min": "https://kendo.cdn.telerik.com/2015.3.1111/js/kendo.all.min"

}

shim{

     "kendo.all.min": { deps: ["angular", "jquery"] }

}

 

then in my app's module I can add the dependency "kendo.directives" and hey presto my scheduler directive comes to life.

 

But if I change that URL to a path to my local copy of kendo.all.min.js - "kendo.all.min": "lib/kendo-ui/kendo.all.min" - then nothing works.

0
Accepted
Petyo
Telerik team
answered on 04 Mar 2016, 07:59 AM
Hi,

the 2016.1.112 version had several problems with the requirejs modules. Please give the service pack we released (1.226) a try. 

Regards,
Petyo
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Matthew
Top achievements
Rank 1
answered on 04 Mar 2016, 09:25 AM
That fixes it. 
Tags
Integration with other JS libraries
Asked by
Matthew
Top achievements
Rank 1
Answers by
Matthew
Top achievements
Rank 1
Georgi Krustev
Telerik team
Petyo
Telerik team
Share this question
or