I am using semantic-ui in my project, pulgin - checkbox
someone will say if you are using jQ plugin you should use it in angular directive
but it does not work
check the box in the semantic-ui parameter in the ui semantics API document, you must check this box in init
$('.ui.checkbox').checkbox();
I am trying to change it to angular as follows:
app.html
<div class="ui animate list"> <div class="item ui toggle checkbox" todo-checkbox ng-repeat="item in day track by $index"> <input type="checkbox"> <label ng-bind="item.content"></label> </div> </div>
and this is the directive in angularjs file
todoApp.directive('todoCheckbox', function() { return { restrict: 'A', link: function(scope, elem, attrs) { $(elem).checkbox(); } }; });
but it does not work in my project. Why?
source share