Unable to create another Vue instance on app.js
On the Spark>resources/assets/js/app.js
require('spark-bootstrap');
require('./components/bootstrap');
var app = new Vue({
mixins: [require('spark')]
});
new Vue({
el: '#app',
data: {
state: 'on'
}
});
After compiling i get this console error:
[vue warn] Cannot find element: #app
The output of blade.php file on the browser :
{{state}}
I don't understand why it's throwing me this error. That was running just fine on laravel but not spark
When I try this
require('spark-bootstrap');
require('./components/bootstrap');
var app = new Vue({
data:{
state: 'on'
},
mixins: [require('spark')]
});
then the console error resolves but the output is the same.
This is what I get in the browser
{{state}}
On console, if I do
$vm0.state
i get the state output which is "on"
Please or to participate in this conversation.