Answers for "how to create a global variable in vue"

4

how to create a global variable in vue

// in main =.js
Vue.prototype.$appName = 'My App'

////in components 
 console.log(this.$appName)
Posted by: Guest on April-18-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language