93
rated 0 times
[
95]
[
2]
/ answers: 1 / hits: 21486
/ 13 Years ago, thu, february 2, 2012, 12:00:00
I have a javascript object obj
and the value of the key can be true
or false
.
This value is passed to mustache template.
// javascript object
obj = {
like: true // or false
}
// template
<span>
{{ like }}
</span>
Now I would like having the result of the rendering in this way:
<span>
Like <!-- If {like: true} --->
</span>
<span>
Unlike <!-- If {like: false} --->
</span>
What is the best way to make it in mustache template?
More From » mustache