Thanks for reading my question.
I have read about my problem
VUE JS 2 + WEBPACK Cannot read property 'get' of undefined VUE RESOURCE
But my system no read Vue var :(
I have a vue component calls app.vue and i need to use vue-resource to get data from my post. But the error a lot times is:
TypeError: Cannot read property 'post' of undefined
at VueComponent.loadingProcess
Do u have ideas to solve it?
My app.vue
<script>
var Vue = require('vue');
//Vue.use(require('vue-resource'));
//Vue.use();
export default {
data () {
return {
msg: 'Hello from vue-loader! nice!',
user: {}
}
},
mounted: function () {
this.loadingProcess();
},
methods: {
loadingProcess: function () {
var urlPost;
var answQSend = {...};
var that = this;
var jsonSend = {
"form_data": answQSend,
"prod_id": 3
};
Vue.$http.post(urlPost, jsonSend, {
"headers": {
"content-type": "application/json"
}
})
.then(function(response) {
})
...
Thanks in advance!