开发者

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

开发者 https://www.devze.com 2023-01-14 07:56 出处:网络
I have a Jade template that needs to call a helper, but not display its output: // views/foo.html.jade:

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

精彩评论

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