The corresponding concept in Ember is class name bindings.
There are various ways you can bind a class name or other html attribute to a value in your application:
1) the built-in if statement in the template:
<div class="{{if someVariable 'color-blue' 'not-color-blue}}">...</div>
2) by passing the classNameBindings attribute to your component:
{{foo-bar classNameBindings="isBlue:color-blue" model=model}}
isBlue: Ember.computed(function(){
return (this.get('model.color.name') === 'blue');
})
3) component.js( - # 2 , , .js ):
classNameBindings: ["isBlue:color-blue"],
isBlue: Ember.computed(function(){
return (this.get('model.color.name') === 'blue');
})
№ 2 № 3 - . classNameBindings - . .
:
http://guides.emberjs.com/v2.0.0/components/customizing-a-components-element/