Skip to content

Instantly share code, notes, and snippets.

View herrhelms's full-sized avatar
🛠️
Building...

@herrhelms herrhelms

🛠️
Building...
View GitHub Profile
@herrhelms
herrhelms / ironrouter-waiton.js
Last active June 22, 2020 17:26
how to wait on multiple subscriptions with iron:router and make it available as data in your template...
--- <yourproject.js> ---
SubscriptionOne = new Meteor.Collection('subscription1');
SubscriptionTwo = new Meteor.Collection('subscription2');
if(Meteor.isClient) {
// iron:router route
Router.route('/', {
onBeforeAction:function() {
// .. any onBeforeAction
var map, map_canvas;
var MapController = RouteController.extend({
onStop: function() {
if(!map_canvas) {
return;
}
map_canvas.detach();
}
});