我不知道如何在 Jade 文件中使用 if 和 else。
我有:
br
each test in changes
.change-row
if test.property == "Image"
strong #{test.property}
else{
strong #{test.property}
span : #{test.newValue}
}
最佳答案
您必须从 else 中删除大括号并正确缩进代码。
br
each test in changes
.change-row
if test.property == "Image"
strong #{test.property}
else
strong #{test.property}
span : #{test.newValue}
关于javascript - 如何在 Jade 中使用 if 和 else,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40912370/