[Vuejs]-How do i select a line of code that will loop in vue js?

0👍

Hope iv’e got your question right,

You are currently creating a form element for every menu in the menus array.
Everything in this form element will be a part of each loop… If you want the legend not to be a part of it – you need to take it out of the lopped element, meaning above/ below the lopped on form.

something like this:

 <div id="container">
    <legend> Form </legend>
    <form v-for="menu in menus">
        <label >{{menu.formm}}</label>
        <input type="text" name="menu.formm" />
    </form>
</div> 

Leave a comment