I have the following AJAX function written in jQuery (just make AJAX call to get outcome for div A and div B - the example is simplified)
JavaScript
$(document).ready(function(){
$( "#c" ).on( "click", function() {
jQuery.ajax({
type: "POST",
url: "post.php",
data: "",
dataType:"JSON",
success: function(data){
if (data.status == 1){
$("#a").html(data.a);
$("#b").html(data.b);
}
}
})
})
})
HTML
<div id="a"></div>
<div id="b"></div>
<button id="c">Start</button>
I understand how to make the HTML template for vue.js and how to set JavaScript variables, but how do I to set AJAX request for vue.js?
Thank you.