mercredi 20 mai 2015

How to compare a value against a lookup table in an ember template

The idea is to be able to perform something similar to this:

{{ #each color in colors }}
   <li class="{{if car.color==color 'selected' " > </li>
{{/each}}

I am aware of the fact that ember's policy is not to have logic in the templates, still, this (simple) problem is not answered to me, after a day's search.




Aucun commentaire:

Enregistrer un commentaire