Ember 1.6.0 和 1.7 Beta 发布,这是第六个发布进程周期,上一个发布版本是 1.0 版本。
Ember.js 1.6 新特性:
Ember.computed.empty Test Friendly Promises Ember.Route.prototype.render Now has a model Option
其他值得注意的改进:
Add better debugging for Resolver Lookup Ensure context is unchanged when using keywords with itemController for {{each}} orcontroller for {{with}} . Fix swallowed rejections in asynchronous route hooks (this may mean that errors that were previously completely swallowed are now surfaced in your application). Ember.copy and Ember.isEqual now support Date objects.
Backburner and RSVP now use the Ember.onerror handler if present to log errors. An error is now thrown when injecting a factory into all factories of the same type.
Ember.js 1.7.0-beta1 包括一些 bug 修复和小的改进,更多内容请看详细的更新日志:
Ember是一个雄心勃勃的Web应用程序,消除了样板,并提供了一个标准的应用程序架构的JavaScript框架。
示例代码: MyApp.president = Ember.Object.create({
firstName: "Barack",
lastName: "Obama",
fullName: function() {
return this.get('firstName') + ' ' + this.get('lastName');
// Tell Ember that this computed property depends on firstName
// and lastName
}.property('firstName', 'lastName')
});
|