New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
checkboxes with array model #1037
Comments
What exactly are you wanting to happen? <script>
new Vue({
data: {
languages: [
{name: 'english', checked:true},
{name: 'japanese', checked:false},
{name: 'chinese', checked:true}
]
}
});
</script>
<span v-repeat='language : languages'>
<input
type='checkbox'
value='{{ language.name }}'
v-model='language.checked'>
</span> You can then use a filter/map to retrieve the names of the selected languages. Here's a jsfiddle demonstrating it. http://jsfiddle.net/rmp135/v9vx9qyd/ |
I guess the use case is to use the check boxes in a similar manner that
|
Old example here: http://jsfiddle.net/yyx990803/1onz2ho7/1/ Please open questions like this at vuejs/Discussion instead of the core repo. |
How do I get something like this to work?:
The text was updated successfully, but these errors were encountered: