[英]How use if & else in Jade
I don't know how use if & else in Jade file. 我不知道Jade文件中if和else的用法。
I have: 我有:
br
each test in changes
.change-row
if test.property == "Image"
strong #{test.property}
else{
strong #{test.property}
span : #{test.newValue}
}
You have to remove the curly brace from else and indent your code properly. 您必须从其他地方删除花括号并正确缩进代码。
br
each test in changes
.change-row
if test.property == "Image"
strong #{test.property}
else
strong #{test.property}
span : #{test.newValue}
See http://learnjade.com/tour/conditionals/ for more information 有关更多信息,请参见http://learnjade.com/tour/conditionals/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.