{{^在车把中意味着什么 [英] What does {{^ mean in handlebars
问题描述
我有一个包含以下内容的句柄模板:
{{^ is mymodel.someproperty}}
code>
我不明白插入符号的意义是什么。我已经搜索过,唯一看到的地方是把手表达式
它的用法如下:
{{^在句柄中的含义是什么?它看起来像一个.NOT。要不然。或类似的东西。
-Eric
而不是在把手文档是因为它是一个叫做倒置部分的胡须构造。
请参阅: https: //mustache.github.io/mustache.5.html#Inverted-Sections
{{#repo} }
< b> {{名称}}< / b>
{{/ repo}}
{{^ repo}}
无回购:(
{{/ repo}}
I have a handlebars template that contains:
{{^is mymodel.someproperty}}
I don't understand what the significance of the caret symbol is. I've searched around, the only place I'm seeing it is on Handlebars Expressions
It's used like so:
{{#each nav}}
<a href="{{url}}">
{{#if test}}
{{title}}
{{^}}
Empty
{{/if}}
</a>
{{~/each}}
What does "{{^" mean in handlebars? It sort of looks like a .NOT. or .ELSE. or something like that.
-Eric
The reason it's not in the handlebars doc is because it's a mustache construct called an Inverted Section.
See: https://mustache.github.io/mustache.5.html#Inverted-Sections
{{#repo}}
<b>{{name}}</b>
{{/repo}}
{{^repo}}
No repos :(
{{/repo}}
这篇关于{{^在车把中意味着什么的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!