template模板中插入自定义参数

辅助方法(解决模板不能访问全局对象的问题)
使用 template.helper(name, callback) 注册公用辅助方法,例如一个访问全局变量jQuery的方法:
 
template.helper('getJquery', function () {
    return $;
});
 
模板中使用的方式:
 
{{getIquery()}}
原文地址:https://www.cnblogs.com/ouchen0312/p/7448029.html