N
N
Nick Bukovskiy2017-04-08 17:11:03
Laravel
Nick Bukovskiy, 2017-04-08 17:11:03

If I use vue js in conjunction with laravel, a variable error occurs, how to fix it?

Banal example
{{ message }} (в дивах с id="app")

var app = new Vue({
  el: '#app',
  data: {
    message: 'Hello Vue!'
  }
})

It doesn't work because of a conflict (I understand the conflict in the form of a variable {{ message }}) vue and laravel, how to fix this?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
V
Victor, 2017-04-08
@sonterix

RTFM

Y
Yeldos Adetbekov, 2017-04-08
@dosya97

{
data:{...},
...,
delimiters:[""]
}

S
Sungat Arynov, 2017-04-08
@Ginkidayo

Or you can add @ in front of the vue variable, but that's really all perversion.
Use vue components and vue template in it, passing the necessary variables to the components via props or api.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question