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?
it’s just like this: