A
A
Alexey2018-03-12 18:58:05
Vue.js
Alexey, 2018-03-12 18:58:05

Using external vue instance in v-app?

Help me figure it out, today I attached vuetify to the project and for some reason the second vue instance is now undefined in the v-app application
The structure (simplified) is as follows:

<div id="app">
  <v-app>
    {{ bus.someVar }}
  </v-app>
</div>

var bus = new Vue({ data: { someVar: 1 } });
var router = new VueRouter({ });
var vm = new Vue({ el: '#app', router: router });

When trying to use the bus.someVar variable, it says that it is undefined. When used outside of v-app, everything is fine. The router also uses the bus variable, so it's below it. What is wrong here? bus is here to store the state, all ajax + socket requests are also made from it

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexey, 2018-03-12
@Azperin

the problem was solved by updating vue to version v2.5.15

A
Alexey Yarkov, 2018-03-12
@yarkov Vue.js

Well, in honor of what should the bus be available here?
Did you drop it somewhere? In the same data.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question