admin管理员组文章数量:1415664
I pass a variable with the content 0 or 1 to the template.
I would like something to be output if the value is 0 (false) and something else to be output if the value is 1 (true).
I tried the following:
{{#schuelerdaten}}
{{#genehmigt}}Ist genehmigt{{/genehmigt}}
{{^genehmigt}}Ist nicht genehmigt{{/genehmigt}}
{{/schuelerdaten}}
and
{{#schuelerdaten.genehmigt}}
Ist genehmigt.
{{/schuelerdaten.genehmigt}}
The message "Ist nicht genehmigt" always appears when there is a 1 or a 0 in the database.
本文标签: mustacheConditional rendering always shows same message despite variable being 0 or 1Stack Overflow
版权声明:本文标题:mustache - Conditional rendering always shows same message despite variable being 0 or 1 - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745212349a2647964.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论