0👍
Path to yor JS script file is wrong and the browser can’t find it.
Use mix
helper to link to your compiled files. [ also you’re missing your styles file. ]
You can’t use <router-view/>
in your blade file rather you need an element with id="app"
so that vue can mount.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="{{ mix('css/app.css') }}" />
<title>Document</title>
</head>
<body>
<div id="app"></div>
<script src="{{ mix('js/app.js') }}"></script>
</body>
</html>
- [Vuejs]-Getting target element from method (without event)
- [Vuejs]-Nuxt won't load an inlined SVG as Vue component in Firefox, what should I do?
0👍
change assets path to :
<script src="resources/js/app.js"></script>
or
setup webpack build config
assetsPublicPath: './'
or
vue.config.js:
module.exports = {
publicPath: '',
}
There is a reloated problem.
- [Vuejs]-(in promise) TypeError: Cannot read property '0' of null
- [Vuejs]-VueJS child component button changes class of parent
Source:stackexchange.com