将变量值分配给jade中的块

时间:2013-04-25 13:46:59

标签: node.js variables block pug template-engine

是否可以将变量的值赋给块?要么是不可能,要么我做错了。

示例:

- var $foo = "bar"

block #{$foo}
    div.a_class Some content

1 个答案:

答案 0 :(得分:1)

这是不可能的,因为块是编译时,而不是运行时。