Mustache Js:Uncaught Error:语法错误,无法识别的表达式

时间:2015-12-05 19:42:42

标签: php jquery mustache mustache.php

  1. 这是我的模板
  2. <script id="template" type="text/html">
        {{#displayprd}}  
        <div class="w-dyn-item w-col w-col-4 re-thumb" >
        <a class="w-inline-block re-thumb-items modal-link">
        <div class="reward-image thumb"><img class="re-thumb-image">
        </div>
        <div class="r-item-name">{{product_name}}</div>
        <div class="r-points thumb">ddd</div>
        </a>
        </div>
        {{/displayprd}}
        </script>
    
    1. 模板渲染部分
    2. var template = Mustache.compile($.trim($("#template").html()));
        var view = function(movies){
          return template(movies);
        };
      
      1. 在下面用胡子循环时,我收到以下错误,这是什么意思,我该怎么解决它!?!?!
      2. Uncaught Error: Syntax error, unrecognized expression: <div class="w-dyn-item w-col w-col-4 re-thumb" >
                          <a class="w-inline-block re-thumb-items modal-link">
                            <div class="reward-image thumb"><img class="re-thumb-image">
                            </div>
                            <div class="r-item-name">2KG BLACK FOREST CAKE</div>
                            <div class="r-points thumb"></div>
                          </a>
                        </div>
        

0 个答案:

没有答案