Wrap it in a template
tag as the template tag will not appear in the final rendered HTML:
<template v-for="hobby in hobbies">
<input type="checkbox" v-model="userHobbies" v-bind:value="hobby">{{hobby}}
</template>
Or even better, improve your markup semantics and use a label tag:
<label v-for="hobby in hobbies">
<input type="checkbox" v-model="userHobbies" v-bind:value="hobby"> {{hobby}}
</label>
Related Contents:
- How to listen for ‘props’ changes
- Can I pass parameters in computed properties in Vue.Js
- Vue v-on:click does not work on component
- How to call function on child component on parent events
- Methods vs Computed in Vue
- How to add external JS scripts to VueJS Components?
- Vue Js – Loop via v-for X times (in a range)
- Vuex state on page refresh
- [Vue warn]: Property or method is not defined on the instance but referenced during render
- Vue.js dynamic images not working
- Passing props dynamically to dynamic component in VueJS
- Communication between sibling components in Vue.js 2.0
- Vue.js img src concatenate variable and text
- Vue – Deep watching an array of objects and calculating the change?
- How can I go back/route-back on vue-router?
- Vuejs and Vue.set(), update array
- Vue.js: Conditional class style binding
- How to listen to the window scroll event in a VueJS component?
- How to access external json file objects in vue.js app
- How to access the getter from another vuex module?
- Accessing Vuex state when defining Vue-Router routes
- Condition in v-bind:Style
- Vue.js 2: Delete property from data object
- Change the default base url for axios
- File input on change in vue.js
- Vue template or render function not defined yet I am using neither?
- Vuejs Error: The client-side rendered virtual DOM tree is not matching server-rendered
- Use arrow function in vue computed does not work
- Console warning: component lists rendered with v-for should have explicit keys
- How to use Vuetify tabs with vue-router
- How can I set selected option selected in vue.js 2?
- Is it possible to pass a component as props and use it in a child Component in Vue?
- Force download GET request using axios
- Error message. “Props with type Object/Array must use a factory function to return the default value.”
- Vue.js run a code in mounted and again for restart functionality
- Passing props with programmatic navigation Vue.js
- How to define a temporary variable in Vue.js template
- Vuejs typescript this.$refs..value does not exist
- How to use onfocusout function in vue.js?
- Is there any way to ‘watch’ for localstorage in Vuejs?
- Get element height with Vuejs
- Should we use v-model to modify Vuex store?
- How to add a class conditionally in Vue?
- Vue.js: Nuxt error handling
- How to set a component non-reactive data in Vue 2?
- Vue PWA not getting new content after refresh
- Importing javascript file for use within vue component
- Vue 2 – How to set default type of array in props
- vue, emitting vs passing function as props
- What is better in vue.js 2, use v-if or v-show?