Tri-state indeterminate checkboxes in Angular
npm install angular-indeterminatebash
npm install --save angular-indeterminate
`
or
`bash
bower install --save angular-indeterminate
`
and then include (node_modules|bower_components)/angular-indeterminate/dist/angular-indeterminate.js in your dependencies.add
ngIndeterminate to your angular module declaration like so:
`javascript
import ngIndeterminate from 'angular-indeterminate';angular.module('myApp', [ngIndeterminate]);
`
and now you are good to go!usage
the simplest version is to just add an element to your page like this:
`html
`
this create an indeterminate checkbox that uses myList from its containing scope to determine its state.options
$3
This is the list of objects that you want the indeterminate checkbox to act on.
`html
`$3
optional. defaults to enabled. this is the key on the objects whose value you want to be watched and updated by the indeterminate checkbox.`html
`$3
optional. defaults to adminDisabled. if the value at this key is truthy, angular-indeterminate will pretend these list items do not exist when determining and changing state.`html
`$3
What to do when a user clicks on an indeterminate checkbox. Defaults to select which will select all objects, also valid is clear which will de-select all objects.
`html
`$3
optional, but must co-exist if set. defaults to true and false respectively. used for custom true and false values when checking the indeterminate-checkbox. see [input[checkbox]](https://docs.angularjs.org/api/ng/input/input%5Bcheckbox%5D) for more information.`html
`development
pull requests are welcome. please make sure that your code passes the unit tests by running gulp unit` prior to pushing.