0👍
try this:
import Gate from "./Gate";
const $gate = new Gate(window.user);
Vue.prototype.$gate = $gate;
- [Vuejs]-Unable to trigger render when switching between multiple objects containing content in different languages
- [Vuejs]-Why in vue object, this line only need half tag 'template: "<App/>" '
-1👍
You have to import Vue before calling prototype
by this command above your app.js:
import Vue from 'vue/dist/vue'
- [Vuejs]-How To run a function in Vuejs after the component in created?
- [Vuejs]-Nuxt cannot change data variable
Source:stackexchange.com