vitalets / checklist-model

AngularJS directive for list of checkboxes
http://vitalets.github.io/checklist-model
MIT License
1.05k stars 207 forks source link

Custom event variable, to know if checkbox was checked or unchecked #128

Closed Tessmore closed 8 years ago

Tessmore commented 8 years ago

checklist-change event allows a custom function call, but you don't know if the user clicked the checkbox to "check" it or "uncheck" it. With this pull request you can.

I think #127 kind of wants this, but in the checklist-change-before function? Not entirely sure.

beradrian commented 8 years ago

For this you can use the checked scope variable or whatever you specify with ngModel. Check this out: http://jsfiddle.net/s3p9q6zj/