Okay my situation is this…
-
User types a specific address
/search/equipment/:id
-
If they normally typed this, it would return an empty page, however I need to actually visit the page where
:id
exists. -
My current implementation is:
FlowRouter.route('search/equipment/:Id', {
name: 'search-equipment-result',
triggersEnter: [function (context) {
Meteor.subscribe('route.id', context.params.Id, function() {
Session.set("currentSearch", [Equipment.find().fetch()[0]]);
}],
action() {
BlazeLayout.render('App', { yield: 'search_results_equipment' });
}
});
What this is supposed to do is check if the :Id
exists in the Equipment Collection
and if so, then render the appropriate page. But unfortuanately, the page loads prior to this finishing.