6

Why kendo load before Jquery in angular routing template with Kendo grid.

I have ordered the scripts, while clicking any event through angular routing templates getting this error in console.

Note: In page refresh, scripts loaded properly, the application works fine, not getting any error.

Only occurred in event routing. kendo load before jquery why.

order scripts :

    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.9.1/jquery.js"></script>
    <script src="https://code.angularjs.org/1.3.8/angular.js"></script>
    <script src="//kendo.cdn.telerik.com/2016.2.714/js/kendo.all.min.js"></script>
    <script src="https://code.angularjs.org/1.3.8/angular-sanitize.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/angular-ui-router/0.3.1/angular-ui-router.js"></script>
gorkem
  • 731
  • 1
  • 10
  • 17
Mohamed Sahir
  • 2,482
  • 8
  • 40
  • 71

2 Answers2

2

I had the same issue: I was loading jQuery twice.

Tunaki
  • 132,869
  • 46
  • 340
  • 423
abo-elleef
  • 2,100
  • 1
  • 14
  • 16
1

Had the same issue. Resolved it by using the jQuery and angular that comes bundled with kendo

2bit
  • 23
  • 7
  • How exactly did you do that? I am having the same issue. – chinh nguyen van Aug 15 '17 at 13:03
  • If you bought kendo UI professional, you'll have jquery and angular bundled inside kendo/xxxx.x.xxx/jquery.min.js and kendo/xxxx.x.xxx/angular.min.js. For example, our build was kendo/2017.1.223/ – 2bit Aug 16 '17 at 16:49
  • 1
    My best guess as to why that occurs is perhaps because the kendo wrapper refers to the internal version of angular and jquery and on routing the global jquery object is overwritten with kendo's reference which does not exist because we haven't included it in our index file and later resolves to the version of jquery we did include in our index file, which leads to the error. – 2bit Aug 16 '17 at 16:57