Ember 1.11.0 release, new bind-attr syntax and more

On March 27th, Matthew Beale posted on EmberJS.com that a new release of Ember was out, Ember 1.11.0. I am extremely excited to see this release because of one specific feature, the new bind-attr syntax.

##New, simple way

Previously Ember developers had to use the bind-attr syntax to declare an attribute binding to an HTML element. This syntax is ugly:

<div {{bind-attr class="color"}}>

Ugly right? With the release of 1.11.0 came a new syntax that looks like this:

<div class="{{color}}"></div>

The new syntax also includes an inline if helper:

	<div class="{{color}} {{if isEnabled 'active' 'disabled'}}"</div>

Some attributes allow you you to pass a literal value:

<input disabled={{isDisabled}}>

These are great changes that make it just a little bit easier to understand reading Ember; especially those new to Ember. In addition to these changes came a new each with index:

{{#each people as |person index|}}
	<div>{{index}}: {{person.name}}</div>

Note: The first value in the indices will always be “0”.

You can read the announcement of Ember 1.11.0 for a brief list of changes and a link to the official CHANGELOG