Node.js Nodejs express jade链接未正确渲染
我有以下包含在块中的jade文件:Node.js Nodejs express jade链接未正确渲染,node.js,express,pug,Node.js,Express,Pug,我有以下包含在块中的jade文件: .list_fl(style='position:fixed; z-index:100; width:200px;') .ul.line_h30t .li .menu a(href='systemSummary') span(style='font-size:20px;') System summary .ul.line_h20t .li .menu
.list_fl(style='position:fixed; z-index:100; width:200px;')
.ul.line_h30t
.li
.menu
a(href='systemSummary')
span(style='font-size:20px;') System summary
.ul.line_h20t
.li
.menu
span(style='font-size:20px;') Game lobbies
a(href='gamesInProgress/0')
span(style='margin-left:5px;') - Games in progress
a(href='scheduledGames/0')
span(style='margin-left:5px;') - Scheduled games
a(href='completedGamesLog/0')
span(style='margin-left:5px;') - Completed games log
.ul.line_h20t
.li
.menu
span(style='font-size:20px;') Mall status
a(href='mallsAwaitingConfirmation/0')
span(style='margin-left:5px;') - Malls awaiting confirmation
a(href='mallList/0')
span(style='margin-left:5px;') - Mall list
a(href='blackListMalls/0')
span(style='margin-left:5px;') - Black list malls
.ul.line_h20t
.li
.menu
span(style='font-size:20px;') Users status
a(href='userList/0')
span(style='margin-left:5px;') - User List
a(href='monitoredUsers/0')
span(style='margin-left:5px;') - Monitored Users
a(href='userBlackList/0')
span(style='margin-left:5px;') - Black List
.ul.line_h20t
.li
.menu
span(style='font-size:20px;') Commercial
a(href='eventRegistration')
span(style='margin-left:5px;') - Event registration
.ul.line_h20t
.li
.menu
span(style='font-size:20px;') Setting
a(href='gamesSchedule')
span(style='margin-left:5px;') - Games schedule
a(href='gamesLimit')
span(style='margin-left:5px;') - Games limit
然后将其作为一个块添加到主“布局”jade文件中(我在这里使用布局是因为没有更好的术语,我知道jade在这方面的最新变化)。以下是“布局”文件:
doctype 5
html
头
头衔
链接(rel='stylesheet',href='/stylesheets/style.css')
链接(rel='stylesheet',href='/stylesheets/sliding flexible menu.css')
链接(rel='stylesheet',href='/stylesheets/pictogram button.css')
链接(rel='stylesheet',href='/stylesheets/zebra\u datepicker.css')
链接(rel='stylesheet',href='/stylesheets/ccSchedule.css')
我遇到的问题是,当呈现一个页面时,链接会正确显示,例如:
如果我遵循此链接,则该链接将显示为:
如果有人能对此有所了解,我将不胜感激
提前谢谢 您需要使用绝对路径而不是相对路径,如何更改为
a(href='/gamesInProgress/0')
a(href='/gamesInProgress/0')