aarondfrancis / vue-model

Model component for Vue.js
MIT License
855 stars 42 forks source link

Demo #18

Open aarondfrancis opened 7 years ago

aarondfrancis commented 7 years ago

People seem to like demos over docs.

aarondfrancis commented 7 years ago

Probably needs a backend to respond to requests, send validation errors, etc. Can set up something on heroku's free tier

shealan commented 7 years ago

@aarondfrancis I am going to include your library in a Laravel backend -> Vue SPA frontend boilerplate project I am putting on Github. I'd be happy to put a demo online also that you could link to?

aarondfrancis commented 7 years ago

@shealan That would be awesome! Let me know when it's up and I'll definitely include it. Thanks!

shealan commented 7 years ago

I tried to get this running today but I think your package is broken. I can't even get your basic example running on the latest version of Vue.

import VueModel from 'vue-model';
Vue.use(VueModel);

Vue.models.register('users', {
  http: {
    baseRoute: '/users',
  },
});

Gives me: Uncaught TypeError: Cannot read property 'register' of undefined

Moussto commented 7 years ago

Same here

shealan commented 7 years ago

Hey @aarondfrancis just wondered if you have any comments re: getting the package running? I understand life gets in the way so not trying to push for any response/updates, just keen to get it integrated into my project :)

LarryBattle commented 7 years ago

@shealan Here's a fix for the error you posted above. https://github.com/aarondfrancis/vue-model/pull/21/files#diff-c77313286b99f6fd1fe95aea12730c16R191 I didn't create a demo. So I'm not sure if that fixes everything else.

shealan commented 7 years ago

@LarryBattle thanks for that. Most of that is testing stuff which I am not too familiar with, but are you referring to the line you modified to be register: this.register.bind(this),. Is that the issue/fix?

LarryBattle commented 7 years ago

Yes. Try it and let me know if it works.

ghost commented 6 years ago

A demo, working example would be great!! I sort of get most of what you put in the readme, but can't seem to figure out how to include it and make it talk to the server properly. I would really like to include this in my project because it is syntactically better that what I have seen but.....