[英]AngularJS conflicts with jQuery Mobile
I run this simple script that comes from Angular documentation , and it's working fine: 我运行了一个来自Angular文档的简单脚本,它运行良好:
http://plnkr.co/edit/6uIlw6HGVVpT0amF2vhj http://plnkr.co/edit/6uIlw6HGVVpT0amF2vhj
If I add jQuery and jQuery Mobile, then the example doesn't work anymore. 如果我添加了jQuery和jQuery Mobile,则该示例不再起作用。 The radiobuttons are not clickable.
单选按钮不可单击。
Example: If I add these two scripts and the following CSS in the above example: 示例:如果在以上示例中添加了这两个脚本和以下CSS:
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/jquerymobile/1.4.3/jquery.mobile.min.js"></script>
<link rel="stylesheet" href="//ajax.googleapis.com/ajax/libs/jquerymobile/1.4.3/jquery.mobile.min.css" />
If I put them before the include of angular.js, then the radiobutton are clickable, but the display of the choice ("You choose...") doesn't work anymore. 如果将它们放在angular.js的包含之前,则可以单击单选按钮,但是选择(“您选择...”)的显示不再起作用。
Does somebody knows why is it not working? 有人知道为什么它不起作用吗?
Use this Sequence. 使用此序列。 dont know the reason but worked in plunkr.
不知道原因,但在plunkr工作。
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.3.0-rc.2/angular.min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/jquerymobile/1.4.3/jquery.mobile.min.js"></script>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.