Why is the value property of the checkbox not rendered?

I want to make it so that the name property of the object being iterated is substituted into the value="" property of the checkbox. And it is not substituted. Already tried v-bind, and {{}}. He does not want to substitute everything! Render like this: <input type="checkbox" value="item.name">

Maybe because the name is Cyrillic?

 <tr v-for="(item, index) in tags" :key="index"> <td class="checkbox"> <input type="checkbox" value="item.name" v-model="checkedNames"> </td> <td class="tag">{{item.name}}</td> </tr> 

    1 answer 1

    :value so tried?

     new Vue({ el: '#test', data() { return { tags:[ {name:"1"}, {name:"2"}, ] } }, mounted(){ console.log( Array.from(document.querySelectorAll('input[type=checkbox]')).map(el => el.value ) ); } }) 
     <script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.4.2/vue.min.js"></script> <table id='test'> <tr v-for="(item, index) in tags" :key="index"> <td class="checkbox"> <input type="checkbox" :value="item.name"> </td> <td class="tag">{{item.name}}</td> </tr> </table> 

    • And so :value="item.name" and so :value="{name: item.name}" and with this construction {{}} - does not work ( - Vlad
    • @Vlad Made a snippet, it works for me .. - Darth
    • Oh, thank you very much! I’m suffering for two hours)) Your first option immediately earned, I’ve been a bit dumb with the webpack. - Vlad
    • @Vlad and more detail you can? What exactly caused the bug? I just use webpack too, I wonder what you can run into - Darth
    • I've already asked the question how to combine the frontend and vue + node backend in one project - nobody answered me. Well, I myself found a simple boilerplate from a dude github.com/afterburn/node-vue to make it easier to understand, I made my own on its basis. So, the webpack with the current settings seems to be all reloading, the modules update without the reload and injecting styles. As it turned out, everything except the v-bind changes. For them, I had to manually refresh the page - then everything started to render. And that was substituted to me by value="item.name" . I'm used to everything being updated on my own, but here is such a catch. - Vlad