I'm attempting to utilize a function inside another Vue.js method in the following manner:
sendCode: function () {
this.showSection("SENDING");
$.ajax({
url: "someurl" + app.searchResponse.Id,
type: "POST",
contentType: "application/json",
success: function (result) {
if (result.Success) {
this.showSection("SMS SENT");
}
else {
this.showSection("SMS FAILED");
}
},
error: function (error) {
console.log(error);
this.showSection("SMS FAILED");
}
});
},
showSection: function (section) {
return app.ui.currentSection = section;
}
However, I encounter a Type Error stating that this.showSection() is not recognized as a function.