【发布时间】:2016-05-18 20:19:11
【问题描述】:
我无法将我的数据从我的模板助手访问到我的模板中。这很奇怪,因为我已经完成了 100 倍。这是一个简单的例子。我可以在我设置的其他路线/模板组合上做到这一点,但由于某种原因不能在这个组合上做到这一点。
我的控制台是空的,console.log('helper ran') 从来没有运行过,据我所知
在我的部门BH1.html
<template name="departmentBH1">
<h1>WTF</h1>
<h1>{{hospital}}</h1>
</template>
在我的部门BH1.js
Template.departmentBH1.helpers = ({
hospital: function() {
console.log('helper ran');
return 'test';
}
});
在我的 router.js 中
Router.route('/bh/departmentBH1', {
name: 'departmentBH1'
});
在没有来自帮助程序的正确文本的情况下呈现
【问题讨论】:
标签: meteor iron-router meteor-blaze