-1👍
Looks like this
is your problem: you’re referring to this
inside a (non-arrow) function
in your then
. Do you mean to have the function
keyword in there?
methods: {
update(url) {
axios.post(url, {
_method: 'patch',
body: this.body
}).then(response => function () {
this.body = response.body;
this.parsed_body = response.parsed_body;
});
this.editing = false;
},
- [Vuejs]-Dynamic navigation component in Vue.js
- [Vuejs]-VueJS2 – computed property/method is setting Vue.data?
Source:stackexchange.com