how to create a global variable in vue
// in main =.js
Vue.prototype.$appName = 'My App'
////in components
console.log(this.$appName)
how to create a global variable in vue
// in main =.js
Vue.prototype.$appName = 'My App'
////in components
console.log(this.$appName)
global variable vuejs
import Axios from 'axios'
// set global axios like this
Vue.prototype.$axios = Axios;
// call axios like this
this.$axios.get('https://jsonplaceholder.typicode.com/todos/1')
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us