0👍
Can’t see what’s wrong. so the problem is probably with this code
@section('javascript')
<script>
new Vue({
el: '#foo',
data: {
message: 'Hello Vue!'
}
})
</script>
@endsection
You might not have yield('javascript')
at your layouts/app.blade.php
- [Vuejs]-Can't access Vue from js
- [Vuejs]-How to add/remove class from parent div on change radio button in vuejs
-1👍
data
should be a function that returns an object.
new Vue({
el: '#foo',
data: function () {
return {
message: 'Hello Vue!'
}
}
})
Source: https://v2.vuejs.org/v2/style-guide/#Component-data-essential
- [Vuejs]-Vue.js – Use props in single file component script section
- [Vuejs]-Vuejs nested components, templates, and using Modals
Source:stackexchange.com