开发者

How do I evaluate a helper in Jade without outputting its result?

I have a Jade template that needs to call a helper, but not display its output:

// views/foo.html.jade:
p
  Some content...
#{ someHelperSetterMethod('bar'); }

Unfortunately, since someHelperSetterMethod returns nothing, I get "undefined" output in my template.开发者_如何学编程 Is there a way to do non-outputting evaluation?


p
  some content
- someHelperSetterMethod('bar')
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜