跳到主要内容
CNode

使用jade时,遇到包含underscore模板的情况下如何解决

社区
Ttutudtutud发布于 13 年前最后回复 13 年前
341760
div#todoapp
  div
   h1 Todo
   input(id='new-todo', type='text', placeholder='接下来要做什么?')
  div#main
   input(id='toggle-all', type='checkbox')
   span.help-inline 标记所有事项 [双击修改]
   ul#todo-list.unstyled
  div#footer
 //- 模板
 script(type='text/template', id='item-template').
  <div class="view">
       <input class="toggle" type="checkbox" <%= done ? 'checked="checked"' : '' %> />
       <%= title %>
      <a class="destroy"></a>
     </div>
     <input class="edit" type="text" value="<%= title %>" />
查看回复

回复 (3)

T
tutudtutud#313 年前

嗯 多谢 实在没想到缩进的问题也会导致错误

T
tutudtutud#213 年前

报错了
Invalid indentation, you can use tabs or spaces but not both

J
jiyinyiyong#113 年前

这个好像就答案了?

参与回复

登录后即可参与回复。登录