Skip to content
This repository was archived by the owner on Jun 30, 2018. It is now read-only.
/ vue-relation Public archive

A set of Vue.js mixins for modelling relations between components

License

Notifications You must be signed in to change notification settings

kasperisager/vue-relation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Vue Relation

A set of Vue.js mixins for modelling relations between components

Contents

Installation

$ yarn add vue-relation

Usage

import {relation, hasOne, memberOf} from 'vue-relation';

const family = relation()

const parent = {
  mixins: [
    hasOne(family, 'child')
  ],
  created () {
    console.log(this.child)
  }
}

const child = {
  mixins: [
    memberOf(family, 'parent')
  ],
  created () {
    console.log(this.parent)
  }
}

License

Copyright © 2017 Kasper Kronborg Isager. Licensed under the terms of the MIT license.

About

A set of Vue.js mixins for modelling relations between components

Resources

License

Stars

Watchers

Forks

Packages

No packages published