I have a bookings rental app and all my listing appears. But for each special listing I have a dynamically generated drop down menu taking the id of the listing as a parameter to filter out results. My code works excellent on localhost but on meteor deploy the drop down list appears blank. I researched about it online and what it seems to me is it that I haven’t done anything to handle till the collections are loaded. But the drop down menu isnt populated even when kept unhindered for ages. My main listing has way more data but loads faster.
Note: It’s not that the location subscription loads slow, it doesn’t load at ALL on meteor deploy but works on localhost perfectly
Here is my code
Meteor.publish('locations', function(id){
check(id, String);
return Locations.find({owner: id});
});
Router.js
Router.route("/listing/:_id", {
name: "locationList",
waitOn: function () {
var someId = this.params._id;
return [Meteor.subscribe("locations",someId)];
}
});