我们正在使用Jquery模板,只有在结果数据为>时才需要打印按钮单击此处。 1
我试过下面的东西,但它没有用。
<script id="xyz" class="sectionTemplate" type="text/x-jquery-tmpl">
{{if data.length > 1}}
<button type="button" class="button_secondary editButton">Click Here</button>
{{/if}}
</script>
通过设置为数据变量
,传递给此模板的数据为List<UserData>
请建议我如何在jquery模板中找到数据长度。
提前谢谢。