Embedding an ejs template inside of an erb template

后端 未结 3 1427
天涯浪人
天涯浪人 2021-02-10 06:48

I\'m building a javascript-heavy rails 3 app. It uses underscore.js, which has a very elegant templating mechanism built on top of ejs ( http://embeddedjs.com/).

The pr

3条回答
  •  梦谈多话
    2021-02-10 07:40

    Escape your Underscore variables: (The ones you do not want erb to interpolate)

    <%= foo %> becomes:
    
    <%%= foo %>
    

提交回复
热议问题