In Iron router path controller I'm trying to load different templates depending on user login status like this:
Router.map(function() {
this.route('start', {
path: '/',
controller: StartController
});
})
StartController = RouteController.extend({
template: Meteor.user() ? 'home' : 'landing',
waitOn: function() {
return [Meteor.subscribe('something')]
}
});
However I get exception in console: "...Error: Meteor.userId can only be invoked in method calls. Use this.userId in publish functions..."
I don't really understand what that error means, and what Am I doing wrong here.