Pug also provides a negated version unless (the following are therefore equivalent):
unless user.isAnonymous
p You're logged in as #{user.name}
if !user.isAnonymous
p You're logged in as #{user.name}
unless user.isAnonymous
p You're logged in as #{user.name}
if !user.isAnonymous
p You're logged in as #{user.name}
2016-12-27
在pug里- each已經(jīng)無法使用了,需要直接使用each作為循環(huán)
each value , key in imooc
p #{key}: #{value}
另外,注意縮進(jìn)
each value , key in imooc
p #{key}: #{value}
另外,注意縮進(jìn)
2016-12-27
jade已經(jīng)改名pug,并且
a(href="/#{url}") Link
This syntax is no longer supported(這種設(shè)置屬性的語法已經(jīng)在pug里不被支持)
篇幅限制,不能多說,喜歡挑戰(zhàn)的同學(xué)請?jiān)L問pug官方網(wǎng)站的支持文檔里看替換選擇
網(wǎng)址:https://pugjs.org/language/attributes.html
a(href="/#{url}") Link
This syntax is no longer supported(這種設(shè)置屬性的語法已經(jīng)在pug里不被支持)
篇幅限制,不能多說,喜歡挑戰(zhàn)的同學(xué)請?jiān)L問pug官方網(wǎng)站的支持文檔里看替換選擇
網(wǎng)址:https://pugjs.org/language/attributes.html
2016-12-25