I
I
Igor2018-04-18 16:30:25
Vue.js
Igor, 2018-04-18 16:30:25

How to add a component with a unique id to a div element when the :add button is clicked?

Here is a small example of what is needed:

<div id="questions">
         <question id="1">
                <textarea> </textarea>
                <button>Add</button>
           </question>
         <question id="2">
                <textarea> </textarea>
                 <button>Add</button>
         </question>
         <question id="3">
                <textarea> </textarea>
                <button>Add</button>   
         </question>
</div>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
lavezzi1, 2018-04-18
@gruzik

https://jsfiddle.net/6foug2jb/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question