Express 快递、咖啡脚本、标题不起作用

Express 快递、咖啡脚本、标题不起作用,express,coffeescript,Express,Coffeescript,我有咖啡文件,我正在关注peepcode的屏幕广播069 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 titl

我有咖啡文件,我正在关注peepcode的屏幕广播069

 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

不,当我在y本地服务器上点击网页时,它确实显示了,但标题没有显示为登录名。我遗漏了什么?

不确定您提到的一半内容,但看看CS:您的函数没有正确缩进。它不应该是这样的吗:

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

module.exports = routes

你的观点是什么?