简体   繁体   English

hogan.js +翡翠?

[英]hogan.js + jade?

I want to use hogan.js but I currently write all my html in jade. 我想使用hogan.js,但目前我所有的html都用玉写。 How could I set up a workflow that would allow me to write templates in jade but still compile them with hogan? 如何设置工作流程,使我可以用玉器编写模板,但仍可以使用hogan对其进行编译?

Thanks for any help! 谢谢你的帮助!

I suppose you speak, you want to build two sets of templates, one in the server and one client. 我想您说的是,您要构建两组模板,一组在服务器中,另一组在客户端中。 To do this, the client templates are written in Jade. 为此,客户端模板是用Jade编写的。 That is so 就是这样

script#myTempate( type="template/hogan" )
    .timeline
        //load more button
        button {{message}}
        // tweet object
        | {{#tweets}}
        |   {{> tweet}}
        | {{/tweets}} 

And it's the only way to mix these templating systems 这是混合这些模板系统的唯一方法

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM