css - How to do an inline comparison condition to apply a class in emblem? -
i want this:
li class={aproperty=="alpha":active} plain text
where using property, , seeing if matches value, opposed simple boolean.
what valid emblem syntax this? syntax docs show boolean property conditions, , doing example results in browser errors , compile errors.
unfortunately handlebars , emblem both work on booleans. disagree design decision, have jump through hoops add helpers handle them, , syntax isn't clean.
afaik, way via bool property.
in controller:
apropertyalpha: function() { return this.get('aproperty')==='alpha'; }.property('aproperty')
in template:
li class={apropertyalpha:active}
Comments
Post a Comment