I’d like to use a different color for the header of my card. I thought that I could use Spacebars
unique {{if
condition for it but it seems it only works with boolean variables and not with a condition that is checking for a string:
Here’s my code:
{{#if type='ToDo'}}
<div class="paper-card-header teal-header">
{{else}}
{{#if type='Info'}}
<div class="paper-card-header orange-header">
{{else}}
<div class="paper-card-header pink-header">
{{/if}}
{{/if}}
I’d like to use the CSS element of teal-header
for the condition that type==='ToDo'
, orange-header
for the condition that type==='Info' and
pink-headerfor every other value of
type`.
How can I achieve this or is it not possible to do within Meteor?
You can also answer this question at SO: http://stackoverflow.com/questions/35254933/meteor-how-can-i-use-spacebars-to-apply-different-css-elements