Answer the question
In order to leave comments, you need to log in
How to pass data to a component in Vue.JS?
var guestContent = Vue.extend({
template: `
<p>Guest content</p>
`,
data: function () {
myquestions: test();
}
}
);
Vue.component('guestcontent', guestContent);
Answer the question
In order to leave comments, you need to log in
How to send data to parent using props in Vue?
A very similar question I once asked. A good example was dropped.
Data is passed to the component via the props property.
As for v-for, if I understand correctly, it might look like this
<ul>
<li v-for = 'question in myquestions' v-on:click = 'myMethods'>{{question}}</li
</ul>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question