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}
另外,注意縮進
each value , key in imooc
p #{key}: #{value}
另外,注意縮進
2016-12-27
jade已經(jīng)改名pug,并且
a(href="/#{url}") Link
This syntax is no longer supported(這種設(shè)置屬性的語法已經(jīng)在pug里不被支持)
篇幅限制,不能多說,喜歡挑戰(zhàn)的同學(xué)請訪問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é)請訪問pug官方網(wǎng)站的支持文檔里看替換選擇
網(wǎng)址:https://pugjs.org/language/attributes.html
2016-12-25
寫著寫著,也就慢慢發(fā)現(xiàn)不會寫html.了,有神奇的發(fā)現(xiàn)js也不怎么會寫了
2016-12-16