vitalets / checklist-model

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

checklistValue parsed on-demand instead during compile phase #111

Closed wjmazza closed 8 years ago

wjmazza commented 8 years ago

If the value for checklist-value changes after compilation, the directive does not reflect these changes. By moving the "value" definition into the watcher and "setChecked" functions, we always get the latest value.

I originally created this to work with Angular Material's md-virtual-repeat and md-checkbox directives, but it seems it may also resolve/be the same as PR #103 but without the merge conflicts.

beradrian commented 8 years ago

Great! I will merge this. Could you please also write a test case for this? As soon as I have a test case for this, I can release a new version.

wjmazza commented 8 years ago

Will do. Please give me a day to figure out how to simulate the situation without angular-material and then write the tests

beradrian commented 8 years ago

Thanks! In the readme there's a section called "How to add a new test case" to make your life easier. :)

wjmazza commented 8 years ago

Tests have been added. Branch commits squashed/rebased.

beradrian commented 8 years ago

I merged your PR. You'll have to wait for a few days for the release. Thanks a lot!