Template.project.onCreated(function(){
this.result_array=new ReactiveVar([]);
});
Template.project.helpers({
projectlist:function(){
Meteor.call("project.list", function(error, result){
if(error){
console.log("error", error);
}
if(result){
console.log(Template.instance().result_array.get());
Template.instance().result_array.set(result);
}
});
console.log( Template.instance().result_array.get());
return Template.instance().result_array;
},
});
Server Js
Meteor.methods({
'project.list':function(){
return [{project:'jxchvbxc'},{project:'jxchvbxc'},{project:'jxchvbxc'},{project:'jxchvbxc'},{project:'jxchvbxc'},{project:'jxchvbxc'},{project:'jxchvbxc'},{project:'jxchvbxc'},{project:'jxchvbxc'},]
}
});
But I got > Exception in defer callback: badSequenceError
And Exception in delivering result of invoking ‘project.list’