@danilr

Почему шаблон laravel(blade) не видит свойство Vue?

Вот подключаемый скрипт "developer.js"
window.Vue = require('vue');

Vue.component('example-component', require('./components/ExampleComponent.vue').default);

const apps = new Vue({
  el: '#app',
  data:{
    mes: 'guygu'
  },
  mounted(){
    console.log(this.mes);
  }
})

Вот шаблон developer.blade.php
@extends('templates.app')

@section('styles')
<link href="{{ asset('css/developer.css') }}" rel="stylesheet"></link>
@endsection

@section('layout')
<div>
    @{{mess}}  // это свойство пытаюсь вывести на страницу
    <example-component></example-component>
</div>

@endsection

@section('footer-scripts')
<script src="{{ asset('js/developer.js') }}"></script>
@endsection

Ошибка
5dbf13aa84156698619707.png
  • Вопрос задан
  • 317 просмотров
Пригласить эксперта
Ответы на вопрос 1
@andreysuha
Что то знаю
data() {
 return {
     mes: "dfgguu"
}
}
Ответ написан
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы