【发布时间】:2016-03-17 21:23:32
【问题描述】:
我最近一直在玩 Meteor,我无法理解的一件事是如何在将模板发送到客户端之前根据特定条件发布模板。示例:
<head>
<title>Some partially authenticating app</title>
</head>
<body>
{{> unauthorisedContent}}
{{> authorisedContent}}
</body>
我想要做的是当且仅当客户端登录时发送{{> authorisedContent}}模板,然后不有条件地发送它,然后根据客户端上的if (!!Meteor.user())排除它边。如何实现?这是否也可以使用 React JS for Meteor 而不是 Blaze?
【问题讨论】:
标签: meteor reactjs template-engine meteor-blaze