meteor - how to stop Subscribe? -
i have 2 selects seconds values depends on choosen value in first 1 (countrys / states) both collections
when subscribe example belgian country states belgian when choose country (ex. netherlands) states added !
i read must stop de subscription .stop() renew subscription doesnt deems work ???
my code :
'click #statelist' : function(event, template) { var x = mytrim($("#countrylist").val()); var y = countrys.findone({country: x}); var z = y.nr; if(this.statesub != null){ this.statesub.stop(); } this.statesub = meteor.subscribe('statelist', z); } it seems this.statesub undefined if there working subscribe ???
what doing wrong ???
thanks
in template events, this binds context document (in impressive ways sometimes) can this._id document in "html scope" event took place.
if want persist object throughout events, can use template object event receives argument instead. object persist across events, long you're on same template, is.
Comments
Post a Comment