Answer the question
In order to leave comments, you need to log in
How to pass data from parent vue component to child if the latter is its own web component?
Hello. Faced the following problem (Google did not help).
I'm using Vue.js on plain html.
<div id="app">
</div>
var app = new Vue({
el: "#app",
data: function () {}
...
})
<template>
<div>
<h1>{{title}}</h1>
<p>{{obj.id}}</p>
...
</div>
</template>
<script>
export default {
name: "MyComponent",
props: {
title: {
type: String
},
obj: {
type: Object
},
arr: {
type: Array
}
}
};
</script>
<div id="app">
<my-component v-bind:text="title" v-bind:obj="objOne" v-bind:arr="arrTest"></my-component>
</div>
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