Answer the question
In order to leave comments, you need to log in
How to pass data from php to vue.js array?
Good afternoon) There is the following code, how can I pass the values 100, 200, 300, 400 from php to the vue.js array? thanks in advance)
<div id="app">
<test></test>
</div>
<script>
Vue.component('test', {
data() {
return {
items:[
{ value: [100, 200] },
{ value: [300, 400] },
],
}
},
template: '<div> <li v-for="item in items">{{ item.value }}</li></div>'
})
new Vue({
el: '#app'
});
</script>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question