vitalets / checklist-model

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

$viewChangeListeners are not called when the model change #146

Open jvanhees opened 8 years ago

jvanhees commented 8 years ago

The functions in the $viewChangeListeners are not called, only when selecting the last checkbox. Now this behaviour originates from the use of ng-repeat, but I think we should be able to solve this in 'checklist-model'. The $viewChangeListeners are invoked when $setViewValue is called to change the view value, which currently isn't used in the directive.

Fiddle highlighting the issue (and also shows the issue with ng-repeat and radio buttons):

https://jsfiddle.net/TheJVH/cbdwwhmp/9/