Skip to content

Commit

Permalink
Subscribe to some stuff all the time #55
Browse files Browse the repository at this point in the history
  • Loading branch information
Zoltan Olah committed Oct 27, 2014
1 parent 3dc0c30 commit 68c157f
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions lib/router.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
var feedSubscription;

// Global subscriptions
if (Meteor.isClient) {
Meteor.subscribe('news');
Meteor.subscribe('bookmarkCounts');
feedSubscription = Meteor.subscribe('feed');
}

Router.configure({
layoutTemplate: 'appBody',
notFoundTemplate: 'notFound',
Expand All @@ -22,13 +31,12 @@ if (Meteor.isClient) {
HomeController = RouteController.extend({
onBeforeAction: function() {
Meteor.subscribe('latestActivity');
Meteor.subscribe('news');
}
});

FeedController = RouteController.extend({
onBeforeAction: function() {
this.feedSubscription = Meteor.subscribe('feed');
this.feedSubscription = feedSubscription;
}
});

Expand Down

0 comments on commit 68c157f

Please sign in to comment.