Skip to content

how do add vue-resource? #424

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ralyodio opened this issue Dec 25, 2016 · 2 comments
Closed

how do add vue-resource? #424

ralyodio opened this issue Dec 25, 2016 · 2 comments

Comments

@ralyodio
Copy link

I have no idea how to make an http call, people tell me to use vue-resource but I'm unclear how to add it to my project. I used the vue-cli webpack template to generate my project.

@XC-Zhang
Copy link

  1. Installing vue-resource via npm
  2. Add code in src/main.js
import Vue from 'vue'
import VueResource from 'vue-resource'
Vue.use(VueResource);
  1. vue-resource is available in vue instance now: this.$http

@rukkiecodes
Copy link

THANKS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants