我有一个使用livestamp的流星应用程序。但是,我希望在反应表中表示一个集合。但是,当我尝试下面的代码时,它不起作用(我在更新的列中看不到任何内容):
Template.sensor_table.helpers
settings: () ->
return {
collection: Sensors
rowsPerPage: 100
showFilter: true
fields: [
{ key: '_id', label: 'id' },
{ key: '_id', label: 'rack', fn: (v,o) -> (getSensor v).rack },
{ key: 'temp', label: 'temperature (degC)' },
{ key: 'ts', label: 'updated', fn: (v,o) -> livestamp v }
]
}
但是当我在模板中使用它时,它工作正常。如何livestamp
在我的反应表中获得功能?