We talk about JavaScript. Each month in Warsaw, Poland.
Starting from version 2.0 coordinated relase of Ember with releases of the main ecosystem tools maintained by the core team. This will allow painless update of related tools in the project.
{ enabled: true, name: "Tom Dale",
details: "A True Scotsman" }
<div class="item">
{{#if enabled}}
<p>It's Enabled</p>
{{/if}}
<p>{{name}}</p>
<p class="popover">{{details}}</p>
</div>
New syntax for bind-attr
<div {{bind-attr class="isActiveUser"}}></div>
// Need to be changed to:
<div class={{if isActiveUser 'is-active-user'}}></div>
One-way values by default
{{!-- title is a mutable two-way binding --}}
{{my-component title=model.name}}
{{!-- title is just an (immutable) value --}}
<my-component title={{model.name}} />
<my-component title={{model.name}} />
// available with
this.attrs.title
// instead of
this.get('title')
let items = {
"Item 1": 1234,
"Item 2": 3456
};
{{#each-in items as |key value|}}
<p>{{key}}: {{value}}</p>
{{/each-in}}
let items = {
"Item 1": 1234,
"Item 2": 3456
};
{{get items 'Item 1'}}
// or
{{get items somePathReturningKey}}
// before 1.13
{{my-counter count=activatedCount}}
// but we still want to update parent value
<my-counter count={{mut activatedCount}} />
Changes to find
New methods for quering server/storage
Async from server/store | Sync from store | Query server | |
---|---|---|---|
Single Record | findRecord(type,id) | peekRecord(type, id) | queryRecord(type, {query}) |
All Records | findAll(type) | peekAll(type) | query(type, {query})* |