vue-global-var
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

vue-global-variable

Reactive global variable can be sharable between components

Demo

Dependencies

Installation

$ npm install --save vue-global-var

How to use

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

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

License

MIT

Package Sidebar

Install

npm i vue-global-var

Weekly Downloads

292

Version

1.0.0

License

MIT

Unpacked Size

14 kB

Total Files

9

Last publish

Collaborators

  • imudin07