Closed Nexus7 closed 10 years ago
In Chapter 17 the book says to add the subscription to currentUser in the router.js:
Router.configure({ layoutTemplate: 'layout', loadingTemplate: 'loading', notFoundTemplate: 'notFound', waitOn: function() { Meteor.subscribe('currentUser'), return [Meteor.subscribe('notifications')] } });
However this code results in errors and the correct code (as in GitHub) should be :
Router.configure({ layoutTemplate: 'layout', loadingTemplate: 'loading', notFoundTemplate: 'notFound', waitOn: function() { return [ Meteor.subscribe('currentUser'), Meteor.subscribe('notifications') ] } });
Thanks!
In Chapter 17 the book says to add the subscription to currentUser in the router.js:
Router.configure({ layoutTemplate: 'layout', loadingTemplate: 'loading', notFoundTemplate: 'notFound', waitOn: function() { Meteor.subscribe('currentUser'),
return [Meteor.subscribe('notifications')] } });
However this code results in errors and the correct code (as in GitHub) should be :
Router.configure({ layoutTemplate: 'layout', loadingTemplate: 'loading', notFoundTemplate: 'notFound', waitOn: function() { return [ Meteor.subscribe('currentUser'), Meteor.subscribe('notifications') ] } });