Ember 3.11 release, JavaScript Web application development framework

Ember project has released version 3.11 include Ember.js, Ember Data and Ember CLI's.

1, Ember.js is to build a Web application's core framework, Ember.js 3.11 is a progressive, backward compatible Ember releases

New features:

  • Element the Modifiers Forwarding ...attributes: This feature illustrate "splattributes" how to interact with elements characteristic modifiers
  • {{fn}} Assistant: provides a method to pass parameters to an operator, and {{fn}}support other advanced use cases, for example, add additional parameters to an existing function
Current count: {{this.count}}

{{!-- when not passing arguments, these are equivalent --}}
<MyButton @click={{this.countUp}}>Add One</MyButton>
<MyButton @click={{fn this.countUp}}>Add One</MyButton>

{{!-- calls this.countUp(10) when clicked --}}
<MyButton @click={{fn this.countUp 10}}>Add Ten</MyButton>

  • {{ON}} modifier provides a direct way to listen for events on any element DOM
Current count: {{this.count}}

<button {{on "click" this.countUp passive=true}}>Add One</button>

 

  • Ember implantation parameters normalized so that all the base class (i.e., classes provided by the framework Ember) standardized contracts

 2, Ember Data is the official data persistence library Ember.js application

New features:

  • Package: the introduction of a new import syntax

before 

import Model from 'ember-data/model';
import attr from 'ember-data/attr';
import { belongsTo, hasMany } from 'ember-data/relationships';
或者
import DS from 'ember-data';

const { Model, attr, belongsTo, hasMany } = DS;

 

just now

import Model, { attr, belongsTo, hasMany } from '@ember-data/model';

 

3, Ember CLI is used to manage and packaged Ember.js command line interface application

Ember CLI only fixes a few bug.

Upgrade command:

npm install -g ember-cli-update
ember-cli-update

Release Notes

Guess you like

Origin www.oschina.net/news/108325/ember-3-11-released