Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Append a dynamic class to a view having a static class

Tags:

ember.js

How to append a dynamic class to a view that already has a static class?

http://jsfiddle.net/MBmUs/4/

like image 598
Rajat Avatar asked Feb 29 '12 20:02

Rajat


1 Answers

We've recently added this functionality to Ember. With a build off master, or after 0.9.6 is released, you can do:

<div {{bindAttr class="App.foo:a-bound-class :a-static-class"}}></div>
like image 88
ebryn Avatar answered Oct 23 '22 11:10

ebryn