CNode

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

Ttutudtutud发布于13 年前最后回复13 年前4 回复4144 浏览0 收藏
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)

J
jiyinyiyong#1·13 年前

这个好像就答案了?

T
tutudtutud#2·13 年前

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

T
tutudtutud#3·13 年前

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

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