且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Meteor和CoffeeScript:无法调用未定义的方法“helpers”

更新时间:2022-12-29 09:19:38

p>当我用Meteor.startup封装我的代码时,问题已解决(请参阅 David Weldon帖子 )。

The problem is fixed when I wrap my code with Meteor.startup (see David Weldon post).

如果我把.jade和.coffee放到同一级文件夹中meteor会在.jade之前加载.coffee,那么它不会导致这样的模板。为了防止这种情况,你可以用_来为jade文件加上前缀。

if I put .jade and .coffee into same level folder meteor will load .coffee before .jade, then it causes no such template. To prevent this, you can prefix jade files with _.