1.1.0 • Published 8 years ago

angular-three-state-checkbox v1.1.0

Weekly downloads
10
License
MIT
Repository
github
Last release
8 years ago

##Three-state checkbox

Angular directive of three state checkbox.

Useful for sorting.

Default template: 'Material design'


##DEMO

three-state checkbox


##Getting Started

Installing package via NPM npm logo npm i angular-three-state-checkbox --save


Installing package via Bower bower logo bower install three-state-checkbox --save


##How to use

  • Include three-state-checkbox.js and three-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>

License

MIT