jquery模板查找数据结果的长度

时间:2015-08-31 18:37:27

标签: javascript jquery jquery-templates

我们正在使用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模板中找到数据长度。

提前谢谢。

0 个答案:

没有答案