How do I evaluate a helper in Jade without outputting its result?
Question
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?
Solution
p
some content
- someHelperSetterMethod('bar')
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow