Meteor publish and subscribe not working on accessing data on aldeed:tabular -
i have problems meteor publish , subscribe.
well in code, usual used meteor publish , subscribe, seems not working when meteor.publish trying access collection in aldeed:tabular. here code
on server :
meteor.publish("direktoratlist", function(){ return msttbldept.find(); }); meteor.publish("piutangdata", function(){ return tblpiutang.find(); }); meteor.publish("budgetdata", function(){ return tblbudget.find(); }); on client
meteor.subscribe("direktoratlist"); var datafind1 = msttbldept.find().fetch(); meteor.subscribe("piutangdata"); var datafind2 = tblpiutang.find().fetch(); meteor.subscribe("budgetdata"); var datafind3 = tblbudget.find().fetch(); and in common folder (works in client , server)
tblbudget = new meteor.collection("tblbudget"); msttbldept = new meteor.collection("msttbldept"); tblpiutang = new meteor.collection("tblpiutang"); well, aldeed:tabular using tblbudget , tblpiutang collection. when tried in console, length of datafind2, , datafind3 0 (0) collection in aldeed:tabularbut length of datafind1 not 0 , catch data collection.
am wrong?? appreciate :)
Comments
Post a Comment