Reputation: 355
I don't know how use if & else in Jade file.
I have:
br
each test in changes
.change-row
if test.property == "Image"
strong #{test.property}
else{
strong #{test.property}
span : #{test.newValue}
}
Upvotes: 0
Views: 182
Reputation: 4915
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
Upvotes: 1