Can anyone help me with this error?
I use jQuery along with vue.js. Below is the method I am facing ... It is called by mail request. new_usercontains the values obtained from the fields of the html form ...
The values are obtained beautifully when I write it in the console.
The problem occurs when I try to use the ajax method to store data (this is. $ Http.post ()). I get the following error:
TypeError: Unable to read replace property from undefinedView-resource.js: 284
There were several links I went through. But I could help anyone ... I might have made stupid mistakes because I used the above code from a perfectly working script. Therefore, if anyone can spot a mistake, I would be grateful. Thank...:)
Happy coding.
addUser : function(new_user){
console.log(this)
var new_user_input = this.new_user
console.log(new_user_input.name)
this.$http.post("clients/" , new_user_input).then((response) => {
alert("ok")
},(response) => {
alert("failed")
this.form_errors = response.data
});
}
source
share