请教一下不用框架 jade 怎么使用? - V2EX
V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
firhome

请教一下不用框架 jade 怎么使用?

  •  
  •   firhome 2016 年 7 月 8 日 2522 次点击
    这是一个创建于 3578 天前的主题,其中的信息可能已经有所发展或是发生改变。
    我现在用法如下:
    var fn = jade.renderFile('./tmpl/index.jade',{
    cache:true,
    pretty:true
    },function(err,html){
    response.writeHead(200, {"Content-Type": "text/html"});
    console.log(html);
    response.write(html);
    response.end();
    });

    console.log 能正常显示,但是 页面一直在加载。 因为html里加个不存在的css,请问这种情况该怎么办呢?页面直接白屏的

    另外问一下。 jade. renderFile 和 jade. compileFile 什么区别呢?
    目前尚无回复
    关于     帮助文档     自助推广系统     博客     API     FAQ     Solana     1555 人在线   最高记录 6679       Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 36ms UTC 16:37 PVG 00:37 LAX 09:37 JFK 12:37
    Do have faith in what you're doing.