dimanche 28 juin 2015

Binding static and dynamic classes with HTMLBars

I'm trying to bind a static class 'form-control' and a dynamic property value 'color' to the class attribute of an input helper, however, the syntax I'm using just outputs this to the rendered DOM element

class="form-control {{color}}" 

without actually binding the value of 'color' to the class attribute. I know that this is the way to bind static and dynamic classes in normal DOM elements with HTMLBars, but is there a different syntax for elements that use curly-braces?

The syntax I'm using:

{{input class="form-control {{color}}" value=property.value type="text"}}




Aucun commentaire:

Enregistrer un commentaire