【发布时间】:2015-09-06 06:54:38
【问题描述】:
In need to check this scenario using handle bar templates
if(data.Id==1 && Isreal==false)
{
//`enter code here
}
else if(data.id==2 && IsReal==true)
//other html
else
`//enter code here`last html
我该怎么做,我尝试使用 helper 但它在我的情况下不起作用
【问题讨论】:
-
我可以比较模板 html 中的值吗?
-
{{#if Status==1}} ///一些 Html {{#else}} {{#if status==2}} //一些 html {{#if}} { {#if}}这是我需要比较值的场景..这可能吗?请帮助
-
{{#if Status==1}} ... {{else}} {{#if status==2}} ... {{else}} ... {{/if}}{{/if}}
标签: handlebars.js handlebarshelper