I want to pass a value from my web component to the vue instance, I want to use it rails html.erb file, Here is the element I am mounting the vue instance on:
<div id="app" :purchaseId="1">
pass it to a vue instance but it does not seem to work, the vue instance is declared in main.js like this:
export default new Vue({
store,
vuetify,
render: h => h(App),
data: {
purchaseId: null
},
methods: {
setJson(payload) {
console.log("payload", payload);
this.purchaseId = payload;
}
}
}).$mount("#app");
After this I want to pass to it's child component, can anyone tell me how can I do that