Skip to content

antontemchenko/three-state-checkbox

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Three-state checkbox

AngularJS directive of three state checkbox.

Useful for sorting.

Default template: 'Material design'


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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages