Reputation: 3892
I am using Quasar 2 Vue 3. Currently I need to import app from "../boot/firebaseConfig";
in every .vue
files and access global variables using app.config.globalProperties.<foo>
syntax. Is there anyway to shorten this to just using this.<foo>
?
Upvotes: 2
Views: 2467
Reputation: 3892
data() {
return {
db: app.config.globalProperties.$db
}
},
methods: {
method1() { this.db ...}
}
Upvotes: 1