Comparing version 1.1.0 to 1.1.1
{ | ||
"name": "vue-axios", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "A small wrapper for integrating axios to Vuejs", | ||
@@ -32,5 +32,3 @@ "main": "dist/vue-axios.min.js", | ||
"gulp-uglifyjs": "^0.6.2" | ||
}, | ||
"dependencies": { | ||
} | ||
} |
# vue-axios | ||
A small wrapper for integrating axios to Vuejs | ||
## How to install: | ||
### CommonJS: | ||
``` | ||
npm install --save axios vue-axios | ||
``` | ||
And in your entry file: | ||
``` | ||
import Vue from 'vue' | ||
import axios from 'axios' | ||
import VueAxios from 'vue-axios' | ||
Vue.use(VueAxios, axios) | ||
``` | ||
### Script: | ||
Just add 3 script in order: `vue`, `axios` and `vue-axios` to your `document`. | ||
## Usage: | ||
This wrapper bind `axios` to var `Vue` or `this` if you're using single file component. | ||
You can `axios` like this: | ||
``` | ||
Vue.axios.get(api).then((response) => { | ||
console.log(response.data) | ||
}) | ||
this.axios.get(api).then((response) => { | ||
console.log(response.data) | ||
}) | ||
``` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
31043
35