Skip to content

mudin/vue-global-var

Repository files navigation

License npm version HitCount size

vue-global-var

Reactive global variable can be sharable between components

Demo

Dependencies

Installation

$ npm install --save vue-global-var

How to use

Vue.use(VueGlobalVar, {
  globals: {
    $user: new User('user1'),
    obj:{},
    config:Config,
    ....
  },
});

Now just use this.$user is any component or $user in its template

License

MIT

Releases

No releases published

Packages

No packages published