Using the already-overused to-do app example, let\'s say I want an element with a \"todo\" class (static) and an \"is-done\" class (dynamic):
EDIT:
We've fixed this in Ember!
On a build from master, or after 0.9.6 is released, you can now do:
Previous answer:
You unfortunately can't have both static and dynamic class names when using bindAttr
.
I suggest using one or more computed properties on your view to output both static and dynamic class names.
Supporting both static and dynamic class names would be very nice, but the way bindAttr
currently works, it's not possible. bindAttr
doesn't know anything about the element it's being attached to during template compilation.