How can I pass a value of a variable to a vue component?
In my example, i have an inline template client-details, i get this view from laravel
so now i want to pass the id which comes with the url /client/1
to my vue
instance.
My component, which is loaded by Laravel
, looks like:
<client-details inline-template>
<div id="client-details" class="">
My HTML stuff
</div>
</client-details>
and mounted by:
Vue.component('client-details', {
data(){
return {
clientId: null
}
},
);
I already tried like
:clientId="{{ $client->id }"
but it does not work.