Problem when receiving return array - Laravel / Vue.js

Asked

Viewed 27 times

0

When I run dd($var)

#attributes: array:3 [▼
  "id" => "1"
  "department" => "TÉCNOLOGIA DA INFORMAÇÃO"
  "branch" => "BIGUAÇU"
]

Error in Vue.js:

app.js:42893 [Vue warn]: Error compiling template:

at the end has this information:

{"current_page":1,"data":[{"id":1,"department":"TÉCNOLOGIA

Raw expression: v-bind:items="{"current_page":1,"data":[{"id":1,"department":"TÉCNOLOGIA"

it seems that when it arrives in the spacing it gives problem.

  • 1

    Exchange the property double quotes, for single quotes: v-bind:items='....' see if it works

  • It worked, buddy, thanks!!!

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.