Skip to content

Repository files navigation

VueModel

A Vue plugin that provides a rich object model for Vue using model.js.

Install & Setup

importVueModelfrom"vuemodel";// Install the Vue pluginVue.use(VueModel);// Define your modelvarmodel=newVueModel({ ... });

How it works

Whereas Vue by default proxies at an object's own properties to enable observable updates, for model types observability is based on the defined schema of the model. To accomplish this, the Vue plugin (installed via the Vue.use() call) obtains a reference to Vue and its internal observer types. When an instance of VueModel is constructed, it hooks into model eventing in order to create a custom observer for model instances, which will raise the appropriate events when model properties are accessed and changed.

License

MIT

About

A Vue plugin that provides a rich object model for Vue using model.js.

Resources

Stars

4 stars

Watchers

5 watching

Forks

Releases

Packages

Used by

Contributors

Languages