Click here to Skip to main content
15,878,809 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have created the sample Angular2 application, while integrating with jquery mobile,it is showing the error: "
JavaScript
zone.min.js:1 Uncaught TypeError: Cannot read property 'zone' of undefined

"
I added "
HTML
<script src="scripts/jquery-1.11.1.min.js"></script>
    <link rel="stylesheet" href="themes/daysi_ab_17032016.min.css" />
    <link rel="stylesheet" href="themes/jquery.mobile.icons.min.css" />
    <link rel="stylesheet" href="css/jquery.mobile.structure-1.4.5.min.css" />
    <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,600,700,400italic' rel='stylesheet' type='text/css'>
    <script src="SCRIPTS/jquery.mobile-1.4.5.min.js"></script>
    <script>
    $(document).bind('mobileinit', function () {
    $.mobile.changePage.defaults.changeHash = false;
    $.mobile.hashListeningEnabled = false;
    $.mobile.pushStateEnabled = false;
    });
    </script>     
    <!-- slider-->
    <script type="text/javascript" src="scripts/jquery-1.10.2.min.js"></script>
    <script type="text/javascript" src="scripts/jquery.glide.min.js"></script>

" in my index.html then nothing works.
but if I comment the above given script "<script src="SCRIPTS/jquery.mobile-1.4.5.min.js"></script> then the application works without error. But That is thevscript which i need the most. :(

What I have tried:

I googled, but couldn't find any related answer or article.
Posted
Updated 27-Mar-16 4:16am
Comments
F-ES Sitecore 27-Mar-16 11:49am    
Try putting the reference to jquery-1.10.2.min.js before the one for jquery.mobile-1.4.5.min.js
Afzaal Ahmad Zeeshan 27-Mar-16 15:40pm    
The errors are coming from the file, zone.min.js. Did you try to debug that file?

1 solution

There was an issue with Zone in Angular 2 version 2.0.0-beta.11 (2016-03-18) that produced an error message like this.

As far as I remember, the docs recommended to ignore this error message in most cases.

Release [^] notes are not quite clear on this topic, but I assume this bug got fixed in beta.12 (2016-03-23).


  1. Which version of Angular 2 are you using at the moment? Does upgrading to beta.12 solve the issue?
  2. Does this error message affect your application?


Hope this helps,
– Konstantin
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900