AngularJS directive of three state checkbox.
Useful for sorting.
Default template: 'Material design'
Installing package via NPM
npm i angular-three-state-checkbox --save
Installing package via Bower
bower install three-state-checkbox --save
- Include
three-state-checkbox.js
andthree-state-checkbox.css
to your index.html - Add
threeStateCheckbox
as dependency to your angular module - Use directive by adding
three-state-checkbox
as attribute to your element (<span>
) ng-model
is required- You can use
ng-change
directive either
angular.module("myApp", ["threeStateCheckbox"])
.controller("myCtrl",[function(){
this.checkboxModel = null;
this.onChange = function(){
console.log("changed");
}
}]);
<body ng-app="myApp" ng-controller="myCtrl as mc">
<span three-state-checkbox ng-model="mc.checkboxModel" ng-change="mc.onChange()"></span>
</body>