2013-06-18 20 views
0

我有咖啡文件,我下面peepcode截屏069表示,CoffeeScript的,標題不工作

routes = (app) -> 
app.get '/login', (req, res) -> 
res.render "#{__dirname}/views/login", 
    title: 'Login' 
    stylesheet: 'Login' 

module.exports = routes 

這是我的layout.jade文件

doctype 5 
    html 
    head 
     title= title 
     link(rel='stylesheet', href='/stylesheets/style.css') 
    body 
     block content 

沒有當我打的網頁在本地服務器上,它顯示,但標題不顯示爲登錄。我錯過了什麼?

+0

你的看法是什麼樣子? – malix

回答

0

不確定你提到的一半事情,但看看CS:你的功能沒有正確縮進。它應該不是這樣的:

routes = (app) -> 
    app.get '/login', (req, res) -> 
    res.render "#{__dirname}/views/login", 
     title: 'Login' 
     stylesheet: 'Login' 

module.exports = routes