【发布时间】:2015-01-06 04:11:14
【问题描述】:
我正在使用以下 AngularJS 指令将 Uniform jQuery 插件与 angularjs 集成
myApp.directive('pluginUniform', function() {
return {
restrict: 'A',
link: function(scope, element, attrs) {
element.show().uniform();
if (!element.parents(".checker").length) {
element.show().uniform();
}
}
};
});
我遇到的问题是它没有显示检查 ng-checked="true" 值。但是当我删除 plugin-uniform 属性时,它会显示正确的结果。
例如,在控制器中设置了值$scope.isEmailChecked = true;,但是下面的代码ng-checked="isEmailChecked"没有显示选中的复选框。
<div class="">
<label>
<input type="checkbox" plugin-uniform ng-model="isEmailChecked" ng-true-value="true" ng-false-value="false" ng-checked="isEmailChecked">
I agree
</label>
</div>
有人可以帮我解决这个问题吗?
【问题讨论】:
标签: javascript jquery angularjs checkbox jquery-uniform