I'm trying to reuse a method within another of my vue js methods like this :-
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;
}
But i get caught Type Error stating this.showSection() is not a function.