0π
To pass down data to your components you can use props
.
You can do something like:
<component is="component" :zID="{{ $z->id }}"></component>
And then in your Example.vue
file you have to define your prop
. Then you can access it by this.zID
.
<script>
export default {
props: ['zId'],
mounted () {
// Do something useful with the data in the template
console.dir(this.zId);
}
}
</script>
0π
You can make inline templates directly in your blade views.
<component :props="{{ $props }}" inline-template>....</component>
- [Vuejs]-Vue draggable : input field
- [Vuejs]-How to pass variable from Vuex store to a function as value?
Source:stackexchange.com