因為if語句和form標簽導致頁面不顯示,去掉則正常顯示,不知道是格式問題還是jade對某些標簽不支持,我用的是express?4.X的版本,jade是1.11.0版本,應該是最新的吧,還望大神幫忙解答,不勝感激。layout.jade文件doctype htmlhtml? head? ? title MongoDB example? body? ? h1 My first MongoDB app? ? hr? ? block bodyindex.jade文件extends layoutblock bodyif(authenticated)????????//去掉if else則正常顯示,引入anthenticated變量,初始化為false? p Welcome back, #{me.first}else? p Welcome new visitor? ul? ? li: a(href="/login") Login? ? li: a(href="/signup") Signuplogin.jade文件extends layoutblock bodyform(action="/login",method="POST")????????//去掉這句話正常顯示? fieldset? ? legent Log in? ? p? ? ? label Email? ? ? input(name="user[email]", type="text",value=signupEmail)? ? p? ? ? label Password? ? ? input(name="user[password]", type="password")? ? p? ? ? button Submit? ? p? ? ? a(href="/") Go back
新手提問:《了不起的nodejs:將javascript進行到底》中,使用express jade模板時,頁面不現實問題。
Code_Fulture
2017-02-21 12:47:28