No description, website, or topics provided.
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
demo
dist
LICENSE
README.MD
bower.json
index.html
package.json

README.MD

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