yassine j
yassine j

Reputation: 515

Laravel | Pass a Vue.js value to data-value in blade

I would like to pass the value @{{cash.amount}} in Vue.js to data-value.

<td scope="row"  data-value="HERE">@{{cash.amount}}</td>

I tried this, but not working.

<td scope="row"  data-value="@{{cash.amount}}">@{{cash.amount}}</td>

Thank you

Upvotes: 0

Views: 40

Answers (1)

Boussadjra Brahim
Boussadjra Brahim

Reputation: 1

You should bind it like :

 <td scope="row"  :data-value="cash.amount">@{{cash.amount}}</td>

or

<td scope="row"  v-bind:data-value="cash.amount">@{{cash.amount}}</td>

Upvotes: 1

Related Questions