jQuery的TMPL值我使用這個 - >https://github.com/jquery/jquery-tmpl與物業不工作
我需要的是顯示使用上述遞歸插件對象的數組。
這是怎麼回事? - >{{if value.exists != false}} checked {{/if}}
請考慮下面的代碼:
{{each list}}
<li><label class="checkbox{{if value.exists != false}} active{{/if}}"><input type="checkbox" {{if value.exists != false}} checked{{/if}} disabled>${$value.type}</label></li>
{{/each}}
對象:
{ "list":
[
{ type: "GRAPH_A", exists: true },
{ type: "GRAPH_B", exists: false },
{ type: "GRAPH_C", exists: false },
]
}
這裏的錯誤,我得到:
ReferenceError: value is not defined Source File: app/scripts/jquery.tmpl.min.js
Line: 10
什麼是列表中包含的 – 2013-03-20 08:45:14
「價值」對象在哪裏 – 2013-03-20 08:50:47
@阿倫你走了。做了一個編輯。 – user1966211 2013-03-20 08:51:25