BT

Ember.js 2.3 Release Brings Significant Changes

by James Chesters on Jan 26, 2016 |

The Ember.js team has released the stable version of Ember 2.3, and the first beta of 2.4.

Announcing the changes on the Ember blog, Ember contributor Matthew Beale modestly describes the update as a "minor release." Nonetheless, 2.3 comes with several significant changes, including the ability to use Ember FastBoot with the latest stable release.

An Ember CLI addon, Fastboot allows developers to render and serve Ember.js apps on the server, serving rendered HTML to browsers without the need for the clients to download JavaScript assets. With new testing APIs and Fastboot, the Ember team has added a visit method for Ember.Application and Ember.ApplicationInstance objects.

As Fastboot is oficially still experimental, 2.3 is the first time that it can be used with an Ember release build. It should be noted that among Fastboot's few limitations, it does not support most of jQuery, and the team advises "only the most brave should even consider deploying this to production."

Another new feature in Ember's latest stable release is the introduction of contextual components, that allow multiple components to privately share data, but be invoked in a flexible manner. In the example below shared by Beale on the Ember blog, an {{alert-box}} component yields a contextual component composed of the alert-box-button component and the attribute onclick.

According to Beale "Contextual components are created using the nested form of the component helper, and may be passed attrs and positional params. Contextual components must be invoked with a . in their path, unless they are being passed to the invoking {{component helper."

{{! app/templates/components/alert-box.hbs }}
<div class="alert-box">
  {{yield (hash
    close-button=(component 'alert-box-button' onclick=(action 'close'))
  )}}
</div>
{{! app/templates/index.hbs }}
{{#alert-box as |box|}}
  Danger, Will Robinson!
  <div style="float:right">
    {{#box.close-button}}
      It's just a plain old meteorite.
    {{/box.close-button}}
  </div>
{{/alert-box}}

 "This new feature is a powerful tool for addon authors, allowing them to yield components without having arguments to those components become de-facto public API," Beale said.

Still in Beta, Ember 2.4 is promising the community performance improvements over new framework features. Users should refer to the Ember 2.3 and 2.4 changelogs for full info on the releases.

Ember.js is released via an MIT licence. InfoQ readers can contribute to Ember.js via its GitHub project.

Rate this Article

Relevance
Style

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread
Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Discuss
General Feedback
Bugs
Advertising
Editorial
Marketing
InfoQ.com and all content copyright © 2006-2016 C4Media Inc. InfoQ.com hosted at Contegix, the best ISP we've ever worked with.
Privacy policy
BT

We notice you’re using an ad blocker

We understand why you use ad blockers. However to keep InfoQ free we need your support. InfoQ will not provide your data to third parties without individual opt-in consent. We only work with advertisers relevant to our readers. Please consider whitelisting us.