I'm using Mithrill v1.0.0, here's the code
var scrollable = {};
scrollable.Product = {
list : [],
loadList : function(store){
m.request({
method : "GET",
url : "APIUrl" + store,
withCredentials : true
}).then(function(result){
scrollable.Product.list = result;
})
}
}
scrollable.oninit = function(){
scrollable.Product.loadList("authentic")
}
scrollable.view = function(){
console.log(scrollable.Product.list.result) //Here's give me two line log
}
On the console, its give me two line log, the first one is undefined, and the second one an array with API result values.