angular-three-state-checkbox
v1.1.0
Published
Angular directive of three-state checkbox. Useful for sorting. Default template: 'Material design'
Downloads
199
Maintainers
Readme
##Three-state checkbox
Angular directive of three state checkbox.
Useful for sorting.
Default template: 'Material design'
##DEMO
##Getting Started
Installing package via NPM
npm i angular-three-state-checkbox --save
Installing package via Bower
bower install three-state-checkbox --save
##How to use
- 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
##Example
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>