【发布时间】:2016-03-30 04:22:17
【问题描述】:
我已经为我的所有用户建立了一个 Meteor 项目,其中包含以下问题的答案的指导:SO Question
如果用户是个人资料页面的所有者,我想知道如何向用户显示编辑按钮。
例如,这是我的模板:
<template name="profile">
{{#if <!-- Insert condition here -->}}
<!-- page owner content only -->
{{/if}}
<!-- Content for all to see -->
</template>
我需要在车把中放置什么条件才能仅显示页面所有者内容?是模板助手还是我可以自己设置条件?
只是对路由中的数据来自哪里以及可以在哪里使用等有点困惑。
【问题讨论】:
标签: javascript meteor iron-router user-profile