使用angularjs指令的I检查插件 [英] using angularjs directive for icheck plugin

查看:104
本文介绍了使用angularjs指令的I检查插件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经与我的Angularjs的应用程序有问题,想不通问题出在哪里。

I've a problem with my Angularjs app, cannot figure out where is the problem.

检查它plunker 这里

check it on plunker Here

当我点击它应该运行的I确认()插件按钮,但它不会

when I click the button it should run the iCheck() plugin, but it doesn't

推荐答案

您应该做的一件事来使一切工作:力AngularJS实际使用jQuery

You should do one thing in order to get everything working: force AngularJS to actually use jQuery.

AngularJS包括jQlite在其源$ C ​​$ C,但它是不一样的jQuery。如果包括jQuery的之前 angular.js然后将角用它来代替自己的实现。

AngularJS includes jQlite in its source code, but it's not the same as jQuery. If you include jQuery before angular.js then Angular will use it instead of own implementation.

因此​​,只需要改变这个index.html中:

Thus just change this in index.html:

<script data-require="jquery@*" data-semver="2.0.3" src="http://code.jquery.com/jquery-2.0.3.min.js"></script>
<script data-require="angular.js@*" data-semver="1.2.9" src="http://code.angularjs.org/1.2.9/angular.js"></script>

(jQuery是angular.js之前)

(jQuery is before angular.js)

工作Plunker

这篇关于使用angularjs指令的I检查插件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆