Im new with meteor.
This is my javascript code
Template.data.helpers({
data_res: function () {
//DoChart();
//var a = "aaaa";
//return a;
var a = $.ajax({
method: "post",
url: "http://10.102.4.232:124/getdata.asmx/GetCabang",
data: '',
contentType: "application/json",
success: function (data) {
console.log(data); // 6
}
});
return a;
}
});
This is my template code
<template name="data">
{{data_res}}
</template>
the javascript code is to request a web service view ajax and print it in my template. but in my template, the result is [object Object].
my question is how to print the actual value of ajax result in template???
thank you