I am using the following AngularJS directive to integrate Uniform jQuery plugin with angularjs
myApp.directive('pluginUniform', function() {
return {
restrict: 'A',
link: function(scope, element, attrs) {
element.show().uniform();
if (!element.parents(".checker").length) {
element.show().uniform();
}
}
};
});
The issue I am having is that it does not show checked for ng-checked="true"
values. But when I remove the plugin-uniform
attribute it shows the correct result.
For example, the value $scope.isEmailChecked = true;
is set in the controller, but the following code ng-checked="isEmailChecked"
does not show the checked checkbox.
<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>
Could somebody help me resolve this issue?