Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to create a global variable in vue

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

////in components 
 console.log(this.$appName)
 
PREVIOUS NEXT
Tagged: #create #global #variable #vue
ADD COMMENT
Topic
Name
3+5 =