agonbina / vue-js-data

Not compatible with the latest Vue.js releases so use it for forking/implementation ideas only.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

vue-js-data

Provides bindings for js-data Collection instances to Vue.js view models.

Note: This works only with js-data@3.x

Install:

npm i -S vue-js-data

Usage:

import Vue from 'vue'
import VueData from 'vue-js-data'
import JSData from 'js-data'

Vue.use(VueData, JSData)

const myCollection = new JSData.Collection([{
  id: 1,
  title: 'Hello world.'
}, {
  id: 2,
  title: 'Hello there!'
}])

new Vue({
  data: {
    myItems: myCollection
  },
  template: `
    <ul>
      <li v-for="item in myItems">{{item.id}} has a title: {{item.title}}</li>
    </ul>
  `
})

License

MIT

About

Not compatible with the latest Vue.js releases so use it for forking/implementation ideas only.

License:MIT License


Languages

Language:JavaScript 98.6%Language:HTML 1.4%