Answer the question
In order to leave comments, you need to log in
I can't figure out how to set a variable like in vuex, vue-router?
hello!) why doesn't setting the global vue variable work for me?
on the example of vuex, when initializing vue, I put the variable myVariable in the option
const myVariable = { //... }
new Vue({
myVariable,
store,
render: h => h(App)
}).$mount('#app')
this.myVariable
and this.$myVariable
are equal , of undefined
Vue.use
to install the plugin, if in the plugin, as I understand it, you can also set a global variable.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question