Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在节点中使用刀片模板引擎。我想对元素的类使用变量。
这可能吗?
更新:
我发现。就像属性一样
li(class="#{friend.status}",userId="#{friend.userId}")
是的。您可以使用以下class属性:
class
- var classNames = ["bar", "hello", "world"] li.foo(class=classNames)
将呈现为:
<li class="bar hello world foo"></li>