ユーザーがMeteorにログインしているかどうかに応じてレイアウトを決定するにはどうすればよいですか?
私が試してみました
Router.map(function () {
this.configure({
layoutTemplate: Meteor.userId() ? "appLayout" : "startLayout",
});
});
エラーが発生します
Error: Meteor.userId can only be invoked in method calls. Use this.userId in publish functions.