Dynamically declare data on user click, and send them through vue-resource



  • Hi guys, I’m new to this framework so i am probably wasting your time. I want to add a checkbox and a textfield everytime the user click on a button.
    Textfield is checkbox-related, and I want to send these data I collected, through vue-resource (I know how to do this), but I don’t know how to declare dynamically data.

    Substantially, I want to have an array with checkbox values (true or false) and an array with textbox text values. But the problem is that the user can add (on click) a new checkbox and a new textfield



  • I recommend see about VueJS (vuejs.org). You can use a v-for directive with an array of data and the components will be rendered by loop



  • Yes, I thought of this. I serached through Vue.js website and I found the answer. thanks anyway.


Log in to reply
 

Looks like your connection to Quasar Framework was lost, please wait while we try to reconnect.