[Vuejs]-Vue.js: How to bind key in name input attribute

1👍

To bind you only need to use : like this:

    <tr v-for="(repository, key) in options.repositories">
    <td><input type="text" :name="repositories[key][name]"
               :value="repository.name"
               class="form-control">
    </td>
    <td><input type="text" :name="repositories[key][url]"
               :value="repository.url"
               class="form-control">
    </td>
    <td><input type="text" :name="repositories[key][type]"
               :value="repository.type"
               class="form-control">
    </td>

Leave a comment