【发布时间】:2016-01-06 19:36:29
【问题描述】:
我是流星新手。我开始使用会话来使内容在要使用的不同模板之间产生反应。我还在我的应用程序中使用 Ace 文本编辑器。它有一些配置设置:
Template.template_containing_AceTextEditor.configuration = function(){
return function(editor){
if (Session.get('text') == "something") //here I want it to be reactive
{
//do something every time 'text' changes
}
}
}
而且我也不想丢失 Template.template_ contains_AceTextEditor.configuration,因为它连接到我正在使用的包。
【问题讨论】:
-
你试过使用助手吗?一旦你定义了你的助手(它是反应式的),你可以在把手中使用它 {{#if something}}
标签: meteor reactive-programming ace-editor