vitalets / checklist-model

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

Can not handle single values #140

Closed Colorfulstan closed 8 years ago

Colorfulstan commented 8 years ago

The directive needs to get an array, I understand that and thats fine. But it would be nice if it could just include a check if the given model is an array, and if not just wrap the value in one.

Sounds simple and I have no idea what kind of rat-tail comes with it implementation wise but I think this would be a nice addition. Ran into this issue when setting options on an object dynamically where it could be an array or just a value, but i want to use it for the checklist model in both cases.

beradrian commented 8 years ago

Actually it needs an array. If the directive will create one dynamically you will not be able to read it and use it.